From 96d54565e0b4c3b9803844c17c96477b9b0e5b3d Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 5 Aug 2023 18:20:59 +0200 Subject: [PATCH] Fix multiinstance trigger when provisionning --- hooks/post_app_addaccess | 5 +++-- hooks/post_app_removeaccess | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hooks/post_app_addaccess b/hooks/post_app_addaccess index 15e6ef2..c81f399 100644 --- a/hooks/post_app_addaccess +++ b/hooks/post_app_addaccess @@ -2,13 +2,14 @@ # Source YunoHost helpers source /usr/share/yunohost/helpers -app=$1 +app="${0//.\/50-}" +app_trigger=$1 users=$2 permission=$3 group=$4 #Visitor group has been revomed => app is public -if [ $(echo "$group" | grep visitors) ] && [ $permission = "main" ]; then +if [ $(echo "$group" | grep visitors) ] && [ $permission = "main" ] && [ $app = $app_trigger ]; then #loading settings from the app domain=$(ynh_app_setting_get --app=$app --key=domain) diff --git a/hooks/post_app_removeaccess b/hooks/post_app_removeaccess index e80fea7..42535f1 100644 --- a/hooks/post_app_removeaccess +++ b/hooks/post_app_removeaccess @@ -2,13 +2,15 @@ # Source YunoHost helpers source /usr/share/yunohost/helpers -app=$1 +app="${0//.\/50-}" +app_trigger=$1 users=$2 permission=$3 group=$4 #Visitor group has been revomed => app is private -if [ $(echo "$group" | grep visitors) ] && [ $permission = "main" ]; then +#app & app_trigger to be used for multiinstance +if [ $(echo "$group" | grep visitors) ] && [ $permission = "main" ] && [ $app = $app_trigger ]; then #loading settings from the app domain=$(ynh_app_setting_get --app=$app --key=domain)