From 33c247610aa8d16311de9f730d8eec0386bd3de8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 26 Jun 2021 21:55:15 +0200 Subject: [PATCH] Fix --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index f7c4f21..2eff184 100755 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Collaborative maps and routing with a straightforward interface" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative maps and routing" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 65a6c2d..1ed2dab 100755 --- a/scripts/restore +++ b/scripts/restore @@ -104,7 +104,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Collaborative maps and routing with a straightforward interface" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative maps and routing" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 2855318..1fe992a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,13 +102,15 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # BUILD NODE DEPENDENCIES #================================================= -ynh_script_progression --message="Building node dependencies..." --weight=20 +ynh_script_progression --message="Install $app..." --weight=20 -chown -R $app $final_path - -pushd "$final_path" - ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" install --prefix "$final_path" -g facilmap-server@"$facilmap_version" 2>/dev/null -popd +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + chown -R $app $final_path + pushd $final_path + ynh_exec_as $app "$ynh_node_load_PATH" $ynh_npm install --prefix "$final_path" -g facilmap-server@"$facilmap_version" 2>/dev/null + popd +fi #================================================= # SETUP SYSTEMD @@ -151,7 +153,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Collaborative maps and routing with a straightforward interface" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Collaborative maps and routing" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE