diff --git a/scripts/backup b/scripts/backup index de9fd26..4210504 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,6 +21,13 @@ fi source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #================================================= @@ -82,5 +89,5 @@ if [ -z $backup_core_only ] then ynh_backup "/home/yunohost.app/${app}/data" else - echo "Data dir will not saved, because backup_core_only is set." >&2 + echo "Data dir will not be saved, because backup_core_only is set." >&2 fi diff --git a/scripts/restore b/scripts/restore index 71b0a30..b69a524 100755 --- a/scripts/restore +++ b/scripts/restore @@ -21,6 +21,13 @@ fi source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #=================================================