From 3466946ed99ed048f916d046713ef74214b0821e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 18:44:42 +0200 Subject: [PATCH 1/3] set relative path for --keep opt --- manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/upgrade | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 893da90..e2c07f8 100644 --- a/manifest.json +++ b/manifest.json @@ -22,12 +22,12 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index db71a7d..08203be 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml" diff --git a/scripts/upgrade b/scripts/upgrade index 269d51b..a2c0156 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,9 +72,9 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/inc/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="inc/config.php" - #This remoses the lock to do the post upgrade process. + #This removes the lock to do the post upgrade process. #ynh_secure_remove --file="$final_path/install/lock" fi From e52afee37b4dee682bbbd1ffdc3a9205e75476c1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Aug 2022 08:36:03 +0200 Subject: [PATCH 2/3] Update restore --- scripts/restore | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/restore b/scripts/restore index 12f2012..6778c1a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,6 +14,10 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + #### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -36,17 +40,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -66,18 +64,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -# Recreate a dedicated php-fpm config -ynh_add_fpm_config - -#================================================= -# SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -86,6 +72,20 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= From fc9e388f7a99930a549a365d23f49924d8a95fba Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Aug 2022 08:36:54 +0200 Subject: [PATCH 3/3] Update check_process --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 91ab741..acc4076 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,6 @@ upgrade=1 from_commit=8c280b69fc9901954657432beaffd6b3f440393c backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email=