diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:18:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:18:43 +0000 |
commit | a87066c116bcb21c0e035cc45890cb2916af7b5d (patch) | |
tree | dd06276b5895b5b2a1c823b1ea76710272619238 /debian/icingaweb2-module-eventdb.postinst | |
parent | Adding upstream version 1.3.0. (diff) | |
download | icingaweb2-module-eventdb-a87066c116bcb21c0e035cc45890cb2916af7b5d.tar.xz icingaweb2-module-eventdb-a87066c116bcb21c0e035cc45890cb2916af7b5d.zip |
Adding debian version 1.3.0-5.debian/1.3.0-5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/icingaweb2-module-eventdb.postinst')
-rwxr-xr-x | debian/icingaweb2-module-eventdb.postinst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/icingaweb2-module-eventdb.postinst b/debian/icingaweb2-module-eventdb.postinst new file mode 100755 index 0000000..38f36fa --- /dev/null +++ b/debian/icingaweb2-module-eventdb.postinst @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +MODULE="eventdb" + +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 |