1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Make sure configuration is correct

This commit is contained in:
tituspijean 2023-09-05 22:12:27 +02:00
parent ee3393b9f3
commit 7419e559ac
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 18 additions and 0 deletions

View file

@ -51,6 +51,15 @@ pushd $install_dir/ghost
--mail SMTP --mailuser noreply@$domain --mailpass $mail_pwd --mailhost 127.0.0.1 --mailport 25
popd
config_file=$install_dir/ghost/config.production.json
cat <<< $(jq -r '.database.connection.host = "127.0.0.1"' $config_file) > $config_file
cat <<< $(jq -r '.mail.options.host = "127.0.0.1"' $config_file) > $config_file
cat <<< $(jq -r '.mail.options.ignoreTLS = true' $config_file) > $config_file
if [ ! -s "$config_file" ]; then
ynh_die --message="Something went wrong while setting up the configuration file: it ended up empty."
fi
#=================================================
# SYSTEM CONFIGURATION
#=================================================

View file

@ -125,6 +125,15 @@ pushd $install_dir/ghost
--mail SMTP --mailuser noreply@$domain --mailpass $mail_pwd --mailhost 127.0.0.1 --mailport 25
popd
config_file=$install_dir/ghost/config.production.json
cat <<< $(jq -r '.database.connection.host = "127.0.0.1"' $config_file) > $config_file
cat <<< $(jq -r '.mail.options.host = "127.0.0.1"' $config_file) > $config_file
cat <<< $(jq -r '.mail.options.ignoreTLS = true' $config_file) > $config_file
if [ ! -s "$config_file" ]; then
ynh_die --message="Something went wrong while setting up the configuration file: it ended up empty."
fi
# Cleanup cache
ynh_secure_remove --file="$install_dir/.cache/yarn"