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

Merge pull request #5 from Kloadut/patch-1

[fix] Check that admin exists
This commit is contained in:
Julien Malik 2014-06-30 10:38:46 +02:00
commit b015ce2e5c

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