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:
parent
ee3393b9f3
commit
7419e559ac
2 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue