From 8a6af4505477d55f018d8445141565ddbdc27d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:09:48 +0200 Subject: [PATCH] fix --- scripts/remove | 4 ++-- scripts/restore | 9 ++++++++- scripts/upgrade | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index b89ef85..3ec7dc4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,8 +16,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 -# This should be a symetric version of what happens in the install script - # 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 then @@ -29,6 +27,8 @@ ynh_remove_systemd_config ynh_remove_nginx_config +ynh_remove_nodejs + ynh_secure_remove --file="/etc/cron.d/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index d922fe4..5c7b30d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,14 @@ ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -42,7 +50,6 @@ ynh_restore_file --origin_path="/etc/cron.d/$app" #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -# Typically you only have either $app or php-fpm but not both at the same time... ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 54acbf2..9c56584 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,6 +11,14 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # STOP SYSTEMD SERVICE #=================================================