diff --git a/legacy_app_ynh/manifest.json b/legacy_app_ynh/manifest.json index 5c37eeb..6c2d92c 100644 --- a/legacy_app_ynh/manifest.json +++ b/legacy_app_ynh/manifest.json @@ -30,6 +30,14 @@ }, "example": "/legacy", "default": "/legacy" + }, + { + "name": "is_public", + "type": "boolean", + "ask": { + "en": "Is it a public application?" + }, + "default": true } ] } diff --git a/legacy_app_ynh/scripts/install b/legacy_app_ynh/scripts/install index 475670c..1244cc0 100644 --- a/legacy_app_ynh/scripts/install +++ b/legacy_app_ynh/scripts/install @@ -5,6 +5,7 @@ app=$YNH_APP_INSTANCE_NAME number=$YNH_APP_INSTANCE_NUMBER domain=$YNH_APP_ARG_DOMAIN path=$YNH_APP_ARG_PATH +is_public=$YNH_APP_ARG_IS_PUBLIC # Check domain/path availability sudo yunohost app checkurl $domain/$path -a $app @@ -34,7 +35,7 @@ sudo yunohost app setting $app mysqlpwd -v $db_pwd sudo cp ../sources/importantfile /etc/ # Set the app as public -sudo yunohost app setting $app unprotected_uris -v "/" +[ $is_public -eq 0 ] || sudo yunohost app setting $app unprotected_uris -v "/" # Reload Nginx and regenerate SSOwat conf sudo service nginx reload