diff --git a/scripts/backup b/scripts/backup index f5b753c..95d2fa5 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -# Exit on command errors and treat unset variables as an error -set -eu #================================================= # IMPORT GENERIC HELPERS @@ -15,6 +13,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 #================================================= diff --git a/scripts/restore b/scripts/restore index 699cab0..225a340 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,8 +1,5 @@ #!/bin/bash -# Exit on command errors and treat unset variables as an error -set -eu - #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -15,6 +12,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 #=================================================