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

Merge pull request #18 from YunoHost-Apps/fix_upgrade_issues

Fix upgrade issues
This commit is contained in:
Maniack Crudelis 2017-10-14 15:22:07 +02:00 committed by GitHub
commit 3c31461055

View file

@ -22,6 +22,22 @@ db_name=$(ynh_app_setting_get $app db_name)
with_carddav=$(ynh_app_setting_get $app with_carddav)
with_enigma=$(ynh_app_setting_get $app with_enigma)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
# If db_name doesn't exist, create it
if [ -z $db_name ]; then
db_name=$(ynh_sanitize_dbid $app)
ynh_app_setting_set $app db_name $db_name
fi
# If final_path doesn't exist, create it
if [ -z $final_path ]; then
final_path=/var/www/$app
ynh_app_setting_set $app final_path $final_path
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================