1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Add set -e and proper path check

This commit is contained in:
mbugeia 2015-10-23 16:24:30 +02:00
parent 33447cc2d0
commit 777f30b769
4 changed files with 10 additions and 4 deletions

View file

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
app=kanboard app=kanboard
# The parameter $1 is the backup directory location # The parameter $1 is the backup directory location

View file

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
app=kanboard app=kanboard
# Retrieve arguments # Retrieve arguments
@ -10,10 +12,8 @@ admin=$3
email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g") email=$(sudo yunohost user info $admin | grep mail: | sed "s/mail: //g")
# Check domain/path availability # Check domain/path availability
sudo yunohost app checkurl $domain$path -a $app sudo yunohost app checkurl $domain$path -a $app \
if [[ ! $? -eq 0 ]]; then || (echo "Path not available: $domain$path" && exit 1)
exit 1
fi
# Generate random password # Generate random password
db_pwd=$(openssl rand -hex 15) db_pwd=$(openssl rand -hex 15)

View file

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
app=kanboard app=kanboard
# The parameter $1 is the uncompressed restore directory location # The parameter $1 is the uncompressed restore directory location

View file

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
app=kanboard app=kanboard
# Retrieve settings # Retrieve settings