From 7c587e0fbeecdb62206a5c2c2887c1f0404ff8b5 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 27 May 2018 21:20:04 +0200 Subject: [PATCH] Add missing ynh_abort_if_errors in backup/restore --- scripts/backup | 16 +++++++--------- scripts/restore | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts/backup b/scripts/backup index a3ef46e..369de1e 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,14 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit on command errors and treat access to unset variables as an error -set -eu - #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -21,6 +12,13 @@ set -eu # 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 b4d7ca0..e994b10 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,14 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit on command errors and treat access to unset variables as an error -set -eu - #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -21,6 +12,13 @@ set -eu # 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 #=================================================