From 99e56ac3e685f8edd0efffc56fd961d759dd0c2c Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 7 Oct 2020 02:52:17 +0200 Subject: [PATCH] [fix] Upgrade and restore --- manifest.json | 2 +- scripts/restore | 10 +++++++++- scripts/upgrade | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 43d6c41..46e0a6a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create online webforms and surveys", "fr": "Créez des formulaires et questionnaires en ligne" }, - "version": "1.0.1+200715~ynh2", + "version": "1.0.1+200715~ynh3", "url": "https://framagit.org/framasoft/framaforms", "license": "GPL-2.0-only", "requirements": { diff --git a/scripts/restore b/scripts/restore index 612b2a2..5354124 100644 --- a/scripts/restore +++ b/scripts/restore @@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring user rights..." --weight=1 # Restore permissions on app files chown -R root: $final_path -chmod 2775 "$final_path/sites/default/files" +chmod 2775 "$final_path/app/sites/default/files" mkdir -p "/home/yunohost.app/$app/data" chown -R $app: "/home/yunohost.app/$app/data" @@ -92,6 +92,14 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +#================================================= +# RESTORE THE CRON FILE +#================================================= +ynh_script_progression --message="Restoring cron file..." --weight=1 + +# Restore the file first, so it can have a backup if different +ynh_restore_file --origin_path="/etc/cron.d/$app.conf" + #================================================= # SPECIFIC RESTORATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d649c97..7ad4b88 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -159,7 +159,7 @@ fi #================================================= ynh_script_progression --message="Storing the config file checksum..." --weight=1 -config_file=$final_path/sites/default/settings.php +config_file=$final_path/app/sites/default/settings.php # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$config_file"