postinst is in zabbix-proxy-sqlite3 1:1.8.11-1.
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/bin/sh -e
# If /tmp/ZABBIX_PACKAGE_DEBUG file exists then enable debugging of this script.
#if [ -e /tmp/ZABBIX_PACKAGE_DEBUG ]; then
# set -x
#fi
. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]
if [ "$1" = "configure" ]; then
if ! getent group zabbix > /dev/null 2>&1 ; then
addgroup --system --quiet zabbix
fi
# Does the user 'zabbix' exist?
#
# (No need to move the zabbix user's home directory as done in the
# *-mysql and *-pgsql packages because the *-sqlite3 packages were
# introduced in 1.8.6-1 which did not have the bug #593458 with the
# wrong home directory.)
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-proxy -R
chown -R zabbix:www-data /var/lib/zabbix
# dbconfig-common configuration to set up database
. /usr/share/dbconfig-common/dpkg/postinst.sqlite3
dbc_dbfile_owner="zabbix:www-data"
dbc_dbfile_perms="0600"
dbc_generate_include=template:/etc/zabbix/zabbix_proxy.conf
dbc_generate_include_owner="zabbix"
dbc_generate_include_perms="640"
dbc_generate_include_args="-U -o template_infile=/usr/share/zabbix-proxy/zabbix_proxy.conf"
dbc_go zabbix-proxy-sqlite3 $@
fi
db_stop
# Automatically added by dh_installinit
if [ -x "/etc/init.d/zabbix-proxy" ]; then
if [ ! -e "/etc/init/zabbix-proxy.conf" ]; then
update-rc.d zabbix-proxy defaults >/dev/null
fi
invoke-rc.d zabbix-proxy start || exit $?
fi
# End automatically added section
exit 0
|