#!/bin/sh
#
# Univention Directory Manager UMC service
#  postinst file
#
# SPDX-FileCopyrightText: 2019-2026 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

#DEBHELPER#

# shellcheck source=/dev/null
. /usr/share/univention-lib/all.sh

a2ensite univention-udm.conf
service apache2 reload
create_logfile /var/log/univention/directory-manager-rest.log "root:adm" 640

call_joinscript 22univention-directory-manager-rest.inst

if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "12.4.5"; then
	systemctl try-restart univention-directory-listener
fi

exit 0
