From da4d8e486718c37b57e7ed01fa8fdf09d448dc9d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Sep 2021 13:51:19 +0200 Subject: [PATCH] fix --- conf/config.json | 1 + scripts/install | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conf/config.json b/conf/config.json index 3f3996a..59bca73 100644 --- a/conf/config.json +++ b/conf/config.json @@ -3,6 +3,7 @@ "secret": "__SECRET__", "database": "postgres", "port": "__PORT__", + "bind_address": "127.0.0.1", "admin:username": "__ADMIN__", "admin:password": "__PASSWORD__", "admin:password:confirm": "__PASSWORD__", diff --git a/scripts/install b/scripts/install index bd733c2..c1175ff 100644 --- a/scripts/install +++ b/scripts/install @@ -126,23 +126,20 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Configuring the $app..." --weight=2 setup="{ - \"url\": \"https://${domain}${path_url}\", \"admin:username\": \"$admin\", \"admin:password\": \"$password\", \"admin:password:confirm\": \"$password\", \"admin:email\": \"admin@$domain\", - \"database\": \"postgres\", - \"postgres:host\": \"localhost\", - \"postgres:port\": \"5432\", - \"postgres:username\": \"$db_name\", - \"postgres:password\": \"$db_pwd\", - \"postgres:database\": \"$db_name\" }" pushd $final_path ynh_exec_as $app $ynh_node_load_PATH $final_path/nodebb setup "${setup}" | tee -a $install_log popd +ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json" +chmod 400 "$final_path/config.json" +chown $app:$app "$final_path/config.json" + #================================================= # NGINX CONFIGURATION #=================================================