From d6ea3298b9072cddc2190d508f9f2f64dc0809ec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Jun 2021 21:39:17 +0200 Subject: [PATCH] fix --- check_process | 13 +++---------- scripts/restore | 2 +- scripts/upgrade | 21 ++++++++++----------- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/check_process b/check_process index 15e745b..f7295e7 100644 --- a/check_process +++ b/check_process @@ -1,16 +1,11 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" username="john" name="john" email="admin@example.com" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -30,5 +25,3 @@ Notification=change ; commit=0127b6ce332d4314d139cd62796cb0350adc37f8 name=Testing (#18) manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - - diff --git a/scripts/restore b/scripts/restore index b6c473c..cad785f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -2,7 +2,7 @@ #================================================= # GENERIC START -#================================================= +#=================================================w # IMPORT GENERIC HELPERS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b05a57a..e1aeb88 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,16 +59,23 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # CHECK THE PATH #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." --time --weight=1 + ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data" @@ -93,14 +100,6 @@ ynh_script_progression --message="Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -122,7 +121,7 @@ ynh_add_fpm_config #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload