From d8e64616f00e169d32c646c5d48d8a3c3dd4add8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:11:46 +0200 Subject: [PATCH] Fix --- scripts/install | 6 +++--- scripts/restore | 16 ++++++++-------- scripts/upgrade | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 7d3a3d8..413b7e6 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -72,7 +72,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -122,7 +122,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description "Webserver for your files" +yunohost service add $app --description="Webserver for your files" --log_path="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 617d63a..c02fe02 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,13 +39,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -89,6 +82,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=2 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE SYSTEMD #================================================= @@ -102,7 +102,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description "Webserver for your files" +yunohost service add $app --description="Webserver for your files" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 0f6a9e3..0f1ba02 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "Webserver for your files" +yunohost service add $app --description="Webserver for your files" --log_path="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE