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:
parent
6621d12571
commit
80d212570e
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue