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:
parent
33447cc2d0
commit
777f30b769
4 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
app=kanboard
|
||||
|
||||
# The parameter $1 is the backup directory location
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
app=kanboard
|
||||
|
||||
# The parameter $1 is the uncompressed restore directory location
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
app=kanboard
|
||||
|
||||
# Retrieve settings
|
||||
|
|
Loading…
Reference in a new issue