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)