diff --git a/manifest.json b/manifest.json index 715effd..6718db6 100644 --- a/manifest.json +++ b/manifest.json @@ -37,6 +37,15 @@ }, "example": "/dash", "default": "/dash" + }, + { + "name": "user", + "type": "user", + "ask": { + "en": "Choose the YunoHost user who got access to Linux-Dash", + "fr": "Choisissez l’utilisateur YunoHost qui a accès à Linux-Dash" + }, + "example": "john" } ] } diff --git a/scripts/install b/scripts/install index b7a7397..a1da2f0 100755 --- a/scripts/install +++ b/scripts/install @@ -5,6 +5,7 @@ app=linuxdash # Retrieve arguments domain=$1 path=$2 +user=$3 # Check domain/path availability sudo yunohost app checkurl $domain$path -a $app @@ -33,5 +34,8 @@ sudo cp ../conf/nginx.conf $nginxconf sudo chown root: $nginxconf sudo chmod 600 $nginxconf +sudo yunohost app removeaccess $app +sudo yunohost app addaccess $app -u $user + # Reload web server sudo service nginx reload