1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shaarli_ynh.git synced 2024-09-03 20:26:10 +02:00

[fix] Check that admin exists

This commit is contained in:
Alexis Gavoty 2014-05-29 12:48:44 +02:00
parent 6621d12571
commit 80d212570e

View file

@ -8,6 +8,13 @@ title=$4
privatelinkbydefault=$5
admin=$6
# Check that admin user is an existing account
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
if [[ ! $? -eq 0 ]]; then
echo "Error : the chosen admin user does not exist"
exit 1
fi
sudo yunohost app setting shaarli admin -v $admin
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a shaarli