1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00

Add datapath app setting if needed

Fixes https://github.com/YunoHost-Apps/piwigo_ynh/issues/75
Backup crashed because it expects an app setting that has been created in the install script but not the upgrade one.
This commit is contained in:
Thomas 2021-07-14 17:40:25 +01:00 committed by GitHub
parent 1aa6ce5b59
commit a9ea626518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,15 @@ ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# FIX MISSING APP SETTING THAT BREAKS BACKUP
#=================================================
# If datapath doesn't exist, create it
if [ -z "$datapath" ]; then
datapath=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datapath --value=$datapath
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================