diff --git a/scripts/install b/scripts/install index 3bb9ec1..4b67ab7 100644 --- a/scripts/install +++ b/scripts/install @@ -20,12 +20,12 @@ source /usr/share/yunohost/helpers # Check port availability sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then - exit 1 + ynh_die fi # Check if su_password is not empty if [[ -z "$su_passwd" ]]; then - exit 1 + ynh_die fi # Save app settings diff --git a/scripts/upgrade b/scripts/upgrade index 05a7907..a1a1178 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,2 +1,4 @@ #!/bin/bash +# Exit on command errors and treat unset variables as an error +set -eu