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:
parent
1aa6ce5b59
commit
a9ea626518
1 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,15 @@ ynh_script_progression --message="Checking version..."
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
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
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue