This file is indexed.

postinst is in zabbix-java-gateway 1:2.2.2+dfsg-1ubuntu1.

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
#!/bin/sh

set -e

# If /tmp/ZABBIX_PACKAGE_DEBUG file exists then enable debugging of this script.
#if [ -e /tmp/ZABBIX_PACKAGE_DEBUG ]; then
#    set -x
#fi

if [ "$1" = "configure" ]; then
    if ! getent group zabbix > /dev/null 2>&1 ; then
        addgroup --system --quiet zabbix
    fi

    # Does the user 'zabbix' exist?
    if ! getent passwd zabbix > /dev/null 2>&1 ; then
        # Not yet. Create it.
        adduser --quiet \
            --system --disabled-login --ingroup zabbix \
            --home /var/run/zabbix/ --no-create-home \
            zabbix
    fi

    chown zabbix:zabbix /var/log/zabbix-java-gateway -R
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/zabbix-java-gateway" ] || [ -e "/etc/init/zabbix-java-gateway.conf" ]; then
	if [ ! -e "/etc/init/zabbix-java-gateway.conf" ]; then
		update-rc.d zabbix-java-gateway defaults >/dev/null
	fi
	invoke-rc.d zabbix-java-gateway start || exit $?
fi
# End automatically added section