1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00

Fix admin user

+ check that admin user is an existing account
+ save this setting
This commit is contained in:
ewilly 2016-04-21 07:00:24 +02:00
parent 9aa539104a
commit 0e7ee80fcd

View file

@ -28,7 +28,15 @@ if [[ ! $? -eq 0 ]]; then
exit 1
fi
# 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
# save app settings
sudo yunohost app setting $app admin_user -v "$admin"
sudo yunohost app setting $app is_public -v "$is_public"
sudo yunohost app setting $app domain -v "$domain"
sudo yunohost app setting $app path -v "$path"