From 4618b8504823f05156c4df115349ed7ba60f2fac Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 29 May 2022 17:30:04 +0200 Subject: [PATCH] Fix --- check_process | 2 +- manifest.json | 2 +- scripts/upgrade | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/check_process b/check_process index c379534..ad5191d 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ upgrade=1 #upgrade=1 from_commit=CommitHash backup_restore=1 - multi_instance=1 + multi_instance=0 change_url=1 ;;; Options Email= diff --git a/manifest.json b/manifest.json index b6dd54f..ea8ad44 100644 --- a/manifest.json +++ b/manifest.json @@ -24,7 +24,7 @@ "requirements": { "yunohost": ">= 4.3.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx" ], diff --git a/scripts/upgrade b/scripts/upgrade index 65f3e9c..cb349e0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,13 +12,14 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) port=$(ynh_app_setting_get --app=$app --key=port) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK VERSION @@ -29,7 +30,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -45,14 +46,14 @@ ynh_abort_if_errors #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 +ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1 +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path"