From 36384679c9008d960d1ff7e17116603e6ed19a5a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:23:16 +0200 Subject: Adding debian version 0.20.0-2. Signed-off-by: Daniel Baumann --- debian/icingaweb2-module-incubator.postinst | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 debian/icingaweb2-module-incubator.postinst (limited to 'debian/icingaweb2-module-incubator.postinst') diff --git a/debian/icingaweb2-module-incubator.postinst b/debian/icingaweb2-module-incubator.postinst new file mode 100755 index 0000000..767f345 --- /dev/null +++ b/debian/icingaweb2-module-incubator.postinst @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +MODULE="incubator" + +case "${1}" in + configure) + . /usr/share/debconf/confmodule + + db_get icingaweb2-module-${MODULE}/enable + MODULE_ENABLE="${RET:-true}" + + db_stop + + if ! getent group icingaweb2 > /dev/null + then + groupadd --system icingaweb2 > /dev/null + fi + + if [ "${MODULE_ENABLE}" = "true" ] + then + if [ ! -e "/etc/icingaweb2/enabledModules" ] + then + mkdir -p "/etc/icingaweb2/enabledModules" + chown root:icingaweb2 "/etc/icingaweb2/enabledModules" > /dev/null 2>&1 || true + fi + + ln -sf "/usr/share/icingaweb2/modules/${MODULE}" "/etc/icingaweb2/enabledModules/${MODULE}" + chown root:icingaweb2 "/etc/icingaweb2/enabledModules/${MODULE}" > /dev/null 2>&1 || true + else + rm -f "/etc/icingaweb2/enabledModules/${MODULE}" + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument: \`${1}'." >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 -- cgit v1.2.3