1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00

Delete temporary folder in case of upgrade failure

This commit is contained in:
Jimmy Monin 2019-03-24 09:38:33 +01:00
parent 3c2240a9cd
commit 122ad91d7c

View file

@ -40,6 +40,10 @@ fi
ynh_backup_before_upgrade # Backup the current version of the app
ynh_clean_setup () {
# Delete any created temporary folder
if [ -v tmpdir ] && [ -d $tmpdir ]; then
ynh_secure_remove $tmpdir
fi
ynh_restore_upgradebackup # restore it if the upgrade fails
}
ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est détectée.