summaryrefslogtreecommitdiffstats
path: root/debian/icinga2-ido-pgsql.config
diff options
context:
space:
mode:
Diffstat (limited to 'debian/icinga2-ido-pgsql.config')
-rw-r--r--debian/icinga2-ido-pgsql.config21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/icinga2-ido-pgsql.config b/debian/icinga2-ido-pgsql.config
new file mode 100644
index 0000000..8a59cf7
--- /dev/null
+++ b/debian/icinga2-ido-pgsql.config
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.pgsql
+ dbc_dbname=icinga2
+ dbc_dbuser=icinga2
+ dbc_authmethod_user="password"
+ dbc_go icinga2-ido-pgsql $@
+fi
+
+# check if the feature is enabled
+if test -L /etc/icinga2/features-enabled/ido-pgsql.conf; then
+ db_set icinga2-ido-pgsql/enable "true"
+else
+ db_set icinga2-ido-pgsql/enable "false"
+fi
+db_input high icinga2-ido-pgsql/enable || true
+db_go || true