This file is indexed.

postinst is in icinga2-ido-pgsql 2.4.1-2ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/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


db_stop