#!/bin/bash
#
# Univention syncrepl ldap
#   machine password hook script
#
# SPDX-FileCopyrightText: 2024-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

# shellcheck source=/dev/null
. /usr/lib/univention-server/lib/server_password_change/debug.sh
. /usr/share/univention-lib/ucr.sh

if [ "$1" = "postchange" ] || [ "$1" = "nochange" ] ; then
	if is_ucr_true ldap/database/internal/syncrepl; then
		ucr commit /etc/ldap/slapd.conf
		systemctl restart slapd
	fi
fi
