diff --git a/scripts/backup b/scripts/backup index fa1df5e..9d9d10c 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,5 +1,4 @@ #!/bin/bash -set -eu # exit on error ; treat unset variables as error #================================================= # IMPORT GENERIC HELPERS @@ -7,6 +6,13 @@ set -eu # exit on error ; treat unset variables as error 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/install b/scripts/install index 2cae0b0..d69217f 100644 --- a/scripts/install +++ b/scripts/install @@ -1,5 +1,4 @@ #!/bin/bash -set -eu # exit on error ; treat unset variables as error # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN @@ -10,6 +9,9 @@ path="" # Source app helpers source /usr/share/yunohost/helpers +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + # Set up common variables root_path="$(pwd)/.." final_path=/var/www/mattermost diff --git a/scripts/restore b/scripts/restore index 05e6f78..870d6f7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,5 +1,4 @@ #!/bin/bash -set -eu # exit on error ; treat unset variables as error #================================================= # IMPORT GENERIC HELPERS @@ -7,6 +6,13 @@ set -eu # exit on error ; treat unset variables as error 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/upgrade b/scripts/upgrade index a7e0f2e..1887036 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,9 +1,11 @@ #!/bin/bash -set -eu # exit on error ; treat unset variables as error # Source app helpers source /usr/share/yunohost/helpers +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + # Retrieve arguments domain=$(ynh_app_setting_get mattermost domain) is_public=$(ynh_app_setting_get mattermost is_public)