1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/forgejo_ynh.git synced 2024-09-03 18:36:26 +02:00
forgejo_ynh/hooks/post_user_update

24 lines
685 B
Text
Raw Normal View History

#!/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 <priority>-<app>
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