summaryrefslogtreecommitdiffstats
path: root/debian/icingaweb2-module-statusmap.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:29:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:29:56 +0000
commit2fa7c68e9dcd29a68c4cbf433c892991411e5130 (patch)
tree0083e6e63624cbeab848604e563b8654d94fa9b7 /debian/icingaweb2-module-statusmap.postinst
parentAdding upstream version 20160720. (diff)
downloadicingaweb2-module-statusmap-2fa7c68e9dcd29a68c4cbf433c892991411e5130.tar.xz
icingaweb2-module-statusmap-2fa7c68e9dcd29a68c4cbf433c892991411e5130.zip
Adding debian version 20160720-5.debian/20160720-5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/icingaweb2-module-statusmap.postinst')
-rwxr-xr-xdebian/icingaweb2-module-statusmap.postinst48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/icingaweb2-module-statusmap.postinst b/debian/icingaweb2-module-statusmap.postinst
new file mode 100755
index 0000000..3ec44fc
--- /dev/null
+++ b/debian/icingaweb2-module-statusmap.postinst
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+MODULE="statusmap"
+
+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