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 #=================================================