diff --git a/scripts/backup b/scripts/backup index c0a1e25..5e7bb8b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,4 +1,6 @@ #!/bin/bash + +set -e app=kanboard # The parameter $1 is the backup directory location diff --git a/scripts/install b/scripts/install index e36b41c..c7748ba 100644 --- a/scripts/install +++ b/scripts/install @@ -1,4 +1,6 @@ #!/bin/bash + +set -e app=kanboard # Retrieve arguments @@ -10,10 +12,8 @@ admin=$3 email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g") # Check domain/path availability -sudo yunohost app checkurl $domain$path -a $app -if [[ ! $? -eq 0 ]]; then - exit 1 -fi +sudo yunohost app checkurl $domain$path -a $app \ + || (echo "Path not available: $domain$path" && exit 1) # Generate random password db_pwd=$(openssl rand -hex 15) diff --git a/scripts/restore b/scripts/restore index 34e8abf..42db852 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,4 +1,6 @@ #!/bin/bash + +set -e app=kanboard # The parameter $1 is the uncompressed restore directory location diff --git a/scripts/upgrade b/scripts/upgrade index b9b40e8..a916d82 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,4 +1,6 @@ #!/bin/bash + +set -e app=kanboard # Retrieve settings