From 626784660ed40e21cbcad4dac2304d16e35c36b3 Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 4 May 2018 11:43:51 +0200 Subject: [PATCH] Update backup --- scripts/backup | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/backup b/scripts/backup index b6e4bfb..a2c07cd 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,20 +1,24 @@ #!/bin/bash -# Exit on command errors and treat unset variables as an error -set -eu - +#================================================= +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= if [ ! -e _common.sh ]; then - # Fetch helpers file if not in current directory - sudo cp ../settings/scripts/_common.sh ./_common.sh - sudo chmod a+rx _common.sh + # Get the _common.sh file if it's not in the current directory + cp ../settings/scripts/_common.sh ./_common.sh + chmod a+rx _common.sh 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 #=================================================