From 58152d73739f15b3e01b367414fd7d05167a2fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:10:05 +0200 Subject: [PATCH] cleaning --- scripts/change_url | 2 +- scripts/remove | 5 ++--- scripts/upgrade | 16 ++++++---------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 5df6755..25000f2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name="$app" --action="stop" +ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/remove b/scripts/remove index c5feb91..a9a1baf 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status "$app" >/dev/null diff --git a/scripts/upgrade b/scripts/upgrade index 8ecb28a..501e89e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,17 +72,13 @@ chown "$app:" "$install_dir/server/config.js" #================================================= # BUILD APP #================================================= +ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=16 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=16 - - pushd "$install_dir" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run build - popd -fi +pushd "$install_dir" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run build +popd #================================================= # START SYSTEMD SERVICE