mirror of
https://github.com/YunoHost-Apps/emailpoubelle_ynh.git
synced 2024-09-03 18:26:29 +02:00
Fix
This commit is contained in:
parent
3d0bc0250e
commit
d105480b9f
2 changed files with 15 additions and 28 deletions
|
@ -57,7 +57,7 @@
|
|||
"help": {
|
||||
"en": "The app can be accessed outside Yunohost and anyone will be able to create a trash email adress",
|
||||
"fr": "L'application sera accessible en dehors de yunohost et n'importe qui pourra y créer une adresse poubelle"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -28,6 +28,20 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -52,20 +66,6 @@ if ynh_legacy_permissions_exists; then
|
|||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -83,19 +83,6 @@ ynh_script_progression --message="Upgrading dependencies..."
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
#UPDATE SETTINGS
|
||||
#=================================================
|
||||
|
||||
#mysqlpwd setting was implemented in ynh2 - check if saved and if not implement
|
||||
db_pass=$(ynh_app_setting_get $app mysqlpwd)
|
||||
if [ -z $db_pass ]; then
|
||||
#c'est moche mais ça fera bien l'affaire - en deux lignes sinon pb en fonction du type de shell
|
||||
t=$(cat /var/www/$app/conf.php | grep DBPASS)
|
||||
db_pass=${t:26:24}
|
||||
ynh_app_setting_set $app mysqlpwd $db_pass
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
#INSTALL SOURCES
|
||||
#===============================================
|
||||
|
|
Loading…
Add table
Reference in a new issue