#! /bin/sh

# Script that is executed whenever a new user is deleted from
# the external user source, such as an Active Directory tree or
# /etc/passwd.

# This script executes all scripts in /etc/kopano/userscripts/deleteuser.d
# using find.  The environment variable KOPANO_USER is set, but beware
# that this string can contain any characters, so take heed to correct
# quoting.

if [ -f /etc/sysconfig/kopano ]; then
  . /etc/sysconfig/kopano
elif [ -f /etc/default/kopano ]; then
  . /etc/default/kopano
fi

KOPANO_USER_SCRIPTS=/etc/kopano/userscripts/deleteuser.d
. /etc/kopano/userscripts/users_common.sh
