From 14e95aa67c4b840f6b6139710f64bce9abec3b29 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Sep 2021 09:22:31 +0200 Subject: [PATCH 1/3] Update install --- scripts/install | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 85b9741..7ff40ed 100644 --- a/scripts/install +++ b/scripts/install @@ -133,12 +133,14 @@ setup="{ \"database\": \"postgres\", \"postgres:host\": \"localhost\", \"postgres:port\": \"5432\", - \"postgres:username\": \"${db_name}\", - \"postgres:password\": \"${db_pwd}\", - \"postgres:database\": \"${db_name}\" + \"postgres:username\": \"$db_name\", + \"postgres:password\": \"$db_pwd\", + \"postgres:database\": \"$db_name\" }" -ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" +pushd $final_path + ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" +popd #================================================= # NGINX CONFIGURATION @@ -162,7 +164,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Forum software" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app.log" #================================================= # START ETHERPAD IN BACKGROUND @@ -179,7 +181,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_permission_update --permission="main" --add="visitors" + ynh_permission_update --permission="main" --add="visitors" fi ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" From e3b22cb2d4532a7cd5e23c17f6f4aaddd8497bed Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Sep 2021 09:33:56 +0200 Subject: [PATCH 2/3] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7ff40ed..ef696e9 100644 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,7 @@ setup="{ }" pushd $final_path - ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" + ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" | tee -a $install_log popd #================================================= @@ -164,7 +164,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Nodejs Forum" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Forum software" --log="/var/log/$app/$app.log" #================================================= # START ETHERPAD IN BACKGROUND From 331ffe93b0a3d9b016cc019428b0235abeda2d6c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Sep 2021 10:02:48 +0200 Subject: [PATCH 3/3] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index ef696e9..68c9631 100644 --- a/scripts/install +++ b/scripts/install @@ -98,7 +98,7 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name # Créer le dossier de log mkdir -p /var/log/$app -touch /var/log/$app/nodebb.log +touch /var/log/$app/$app.log install_log=/var/log/$app/installation.log touch $install_log chown $app -R /var/log/$app