#!/bin/bash
#
# This script creates a new LDAP configuration for Apache LinOTP
# needs to reside in /usr/lib/univention-server/server_password_change.d/
#
case "$1" in
prechange)
	# nothing to be done before changing the password
	exit 0
	;;
nochange)
	# nothing to be done when password changed failed
	exit 0
	;;
postchange)
	# after changing the password, create new apache config
	# and reload apache
	ucr commit /etc/apache2/linotp-ldap.auth
	invoke-rc.d apache2 reload
	;;
esac
