From cd3c5606070761a47efe165f59b2c6173d551fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Mar 2023 08:46:08 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3aba23e..704f23c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,6 +88,12 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +env_path="$PATH" +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log" + #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -108,29 +114,15 @@ pushd "$install_dir" ynh_exec_warn_less npm run build popd -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 - -env_path="$PATH" -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log" - #================================================= # ADD UPGRADED CONFIG WITH SANDBOX #================================================= + ynh_add_config --template="../conf/config.js" --destination="$install_dir/config/config.js" +chmod 600 "$install_dir/config/config.js" +chown $app "$install_dir/config/config.js" + #================================================= # START SYSTEMD SERVICE #=================================================