diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
commit | b86b946791f8dcc23ed6c47d513e34ebb22c1610 (patch) | |
tree | 9893d33a249fbf175f69e9f18a7fa0b84718ec24 /debian/icinga2-ido-mysql.postinst | |
parent | Adding upstream version 2.14.2. (diff) | |
download | icinga2-b86b946791f8dcc23ed6c47d513e34ebb22c1610.tar.xz icinga2-b86b946791f8dcc23ed6c47d513e34ebb22c1610.zip |
Adding debian version 2.14.2-1.debian/2.14.2-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/icinga2-ido-mysql.postinst')
-rw-r--r-- | debian/icinga2-ido-mysql.postinst | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/icinga2-ido-mysql.postinst b/debian/icinga2-ido-mysql.postinst new file mode 100644 index 0000000..dd16a19 --- /dev/null +++ b/debian/icinga2-ido-mysql.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-mysql.conf' +dbc_generate_include_owner='nagios:nagios' +dbc_generate_include_args='--ucf -o template_infile=/usr/share/icinga2/tmpl/ido-mysql.conf-sample' +dbc_go icinga2-ido-mysql $@ + + +if [ "$1" = configure ]; then + + # get values from debconf db + db_get icinga2-ido-mysql/enable + + if [ "$RET" = "false" ]; then + if [ -L /etc/icinga2/features-enabled/ido-mysql.conf ] + then + echo "disable ido mysql feature" + icinga2 feature disable ido-mysql + echo "reloading icinga2" + [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload + fi + else + if [ ! -L /etc/icinga2/features-enabled/ido-mysql.conf ] + then + echo "enable ido mysql feature" + icinga2 feature enable ido-mysql + echo "reloading icinga2" + [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload + + fi + fi +fi + +#DEBHELPER# +db_stop + + |