#!/bin/bash ### # This hook is only used because yunohost doesn't trigger any hook when adding a user to a group (e.g. admin) # After adding a user to a group, one should update a user to trigger this hook (https://forum.yunohost.org/t/hook-when-a-user-is-added-in-a-group/25437) # IMPORT GENERIC HELPERS source /usr/share/yunohost/helpers pwd=$(dirname $0) filename=$(basename $0) # Set vars for following script # The file name is - app=${filename#*-} domain=$(ynh_app_setting_get --app=$app --key=domain) path=$(ynh_app_setting_get --app=$app --key=path) # Load common variables and helpers source ${pwd}/../../apps/${app}/scripts/_common.sh synchronize_users