1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/framaforms_ynh.git synced 2024-09-03 18:36:12 +02:00

[fix] Upgrade and restore

This commit is contained in:
ljf 2020-10-07 02:52:17 +02:00
parent 6aab0251e9
commit 99e56ac3e6
3 changed files with 11 additions and 3 deletions

View file

@ -6,7 +6,7 @@
"en": "Create online webforms and surveys", "en": "Create online webforms and surveys",
"fr": "Créez des formulaires et questionnaires en ligne" "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", "url": "https://framagit.org/framasoft/framaforms",
"license": "GPL-2.0-only", "license": "GPL-2.0-only",
"requirements": { "requirements": {

View file

@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring user rights..." --weight=1
# Restore permissions on app files # Restore permissions on app files
chown -R root: $final_path 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" mkdir -p "/home/yunohost.app/$app/data"
chown -R $app: "/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 # Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" 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 # SPECIFIC RESTORATION
#================================================= #=================================================

View file

@ -159,7 +159,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Storing the config file checksum..." --weight=1 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. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$config_file" ynh_store_file_checksum --file="$config_file"