From b86b946791f8dcc23ed6c47d513e34ebb22c1610 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:32:39 +0200 Subject: Adding debian version 2.14.2-1. Signed-off-by: Daniel Baumann --- debian/icinga2-ido-pgsql.postinst | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 debian/icinga2-ido-pgsql.postinst (limited to 'debian/icinga2-ido-pgsql.postinst') diff --git a/debian/icinga2-ido-pgsql.postinst b/debian/icinga2-ido-pgsql.postinst new file mode 100644 index 0000000..a8fe507 --- /dev/null +++ b/debian/icinga2-ido-pgsql.postinst @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst + +#dbc_debug='1' +dbc_generate_include='template:/etc/icinga2/features-available/ido-pgsql.conf' +dbc_generate_include_owner='nagios:nagios' +dbc_generate_include_args='--ucf -o template_infile=/usr/share/icinga2/tmpl/ido-pgsql.conf-sample' +dbc_go icinga2-ido-pgsql $@ + + +if [ "$1" = configure ]; then + + # get values from debconf db + db_get icinga2-ido-pgsql/enable + + if [ "$RET" = "false" ]; then + if [ -L /etc/icinga2/features-enabled/ido-pgsql.conf ] + then + echo "disable ido pgsql feature" + icinga2 feature disable ido-pgsql + echo "reloading icinga2" + [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload + fi + else + if [ ! -L /etc/icinga2/features-enabled/ido-pgsql.conf ] + then + echo "enable ido pgsql feature" + icinga2 feature enable ido-pgsql + echo "reloading icinga2" + [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload + + fi + fi +fi + +#DEBHELPER# +db_stop + + -- cgit v1.2.3