mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
force_stop silencieux et check user verbeux
This commit is contained in:
parent
4d2e8b81b2
commit
23a3534cef
1 changed files with 2 additions and 9 deletions
|
@ -47,24 +47,17 @@ TRAP_ON
|
|||
|
||||
|
||||
# Vérifie la validité de l'user admin
|
||||
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
echo "Wrong admin"
|
||||
touch /force_stop
|
||||
fi
|
||||
sudo yunohost user list --json | grep -q "\"username\": \"$admin\"" || (echo "Wrong admin" && touch /force_stop 2> /dev/null)
|
||||
|
||||
# Vérifie la disponibilité du path et du domaine.
|
||||
sudo yunohost app checkurl $domain$path -a $app
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
touch /force_stop
|
||||
fi
|
||||
|
||||
# Vérifie que le dossier de destination n'est pas déjà utilisé.
|
||||
final_path=/var/www/$app
|
||||
if [ -e "$final_path" ]
|
||||
then
|
||||
echo "This path already contains a folder"
|
||||
touch /force_stop
|
||||
touch /force_stop 2> /dev/null
|
||||
fi
|
||||
|
||||
# Vérifie la présence du / en début de path
|
||||
|
|
Loading…
Reference in a new issue