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
set -e
app=kanboard
# The parameter $1 is the backup directory location

View file

@ -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)

View file

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

View file

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