From 3535ebc901b6f30ccc7123b673ea42354ebe97a3 Mon Sep 17 00:00:00 2001 From: Miraty Date: Sat, 5 Mar 2022 18:08:29 +0100 Subject: [PATCH] Add public/private management --- manifest.json | 5 +++++ scripts/install | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/manifest.json b/manifest.json index 968b584..cc98381 100755 --- a/manifest.json +++ b/manifest.json @@ -38,6 +38,11 @@ "type": "path", "example": "/qr", "default": "/" + }, + { + "name": "is_public", + "type": "boolean", + "default": true } ] } diff --git a/scripts/install b/scripts/install index 8974ab1..ebcdae1 100755 --- a/scripts/install +++ b/scripts/install @@ -5,6 +5,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH +is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Validating installation parameters..." @@ -33,4 +34,10 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." ynh_add_fpm_config +ynh_script_progression --message="Configuring permissions..." +if [ $is_public -eq 1 ] +then + ynh_permission_update --permission="main" --add="visitors" +fi + ynh_script_progression --message="Installation of $app completed" --last