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:
parent
9aa539104a
commit
0e7ee80fcd
1 changed files with 8 additions and 0 deletions
|
@ -28,7 +28,15 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# 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 is_public -v "$is_public"
|
||||||
sudo yunohost app setting $app domain -v "$domain"
|
sudo yunohost app setting $app domain -v "$domain"
|
||||||
sudo yunohost app setting $app path -v "$path"
|
sudo yunohost app setting $app path -v "$path"
|
||||||
|
|
Loading…
Reference in a new issue