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

Admin user is mandatory

This commit is contained in:
plopoyop 2014-09-21 11:52:46 +02:00
parent eee878db51
commit 55ea9e6e9e
2 changed files with 11 additions and 2 deletions

View file

@ -32,8 +32,8 @@
{
"name": "admin",
"ask": {
"en": "Choose the default user (must be an existing YunoHost user) leave empty if none",
"fr": "Choisissez l'utilisateur par defaut (doit être un utiliser YunoHost existant) laisser vide pour aucun"
"en": "Choose the default user (must be an existing YunoHost user)",
"fr": "Choisissez l'utilisateur par defaut (doit être un utiliser YunoHost existant)"
},
"example": "homer"
}

View file

@ -5,6 +5,15 @@ domain=$1
path=$2
admin_user=$3
# Check user parameter
sudo yunohost user list --json | grep -q "\"username\": \"$admin_user\""
if [[ ! $? -eq 0 ]]; then
echo "Wrong user"
exit 1
fi
sudo yunohost app setting freshrss admin_user -v $admin_user
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a freshrss
if [[ ! $? -eq 0 ]]; then