diff --git a/scripts/backup b/scripts/backup index f6484b1..5ddf19d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,4 +1,5 @@ #!/bin/bash +set -eu # Source app helpers source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index e81e2fe..6e2db97 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,4 +1,5 @@ #!/bin/bash +set -eu # Source app helpers source /usr/share/yunohost/helpers @@ -14,14 +15,14 @@ db_pass=$(ynh_app_setting_get $app db_pass) if [ -d $final_path ]; then echo "There is already a directory: $final_path " >&2 - exit 1 + ynh_die fi # Restore Nginx conf=/etc/nginx/conf.d/$domain.d/$app.conf if [ -f $conf ]; then echo "There is already a nginx conf file at this path: $conf " >&2 - exit 1 + ynh_die fi sudo cp -a ./nginx.conf $conf diff --git a/scripts/upgrade b/scripts/upgrade index 54fe0f8..3d6fdd8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,4 +1,5 @@ #!/bin/bash +set -eu source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script