postinst is in zabbix-frontend-php 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 | #!/bin/sh -e
. /usr/share/debconf/confmodule
db_version 2.0 || [ $? -lt 30 ]
if [ "$1" = "configure" ]; then
db_get zabbix-frontend-php/zabbix-server || true
zabbix_server="$RET"
db_get zabbix-frontend-php/zabbix-server-port || true
zabbix_server_port="$RET"
sed -i "s/_ZBX_SERVER_/$zabbix_server/" /usr/share/doc/zabbix-frontend-php/dbconfig.php
sed -i "s/_ZBX_SERVERPORT_/$zabbix_server_port/" /usr/share/doc/zabbix-frontend-php/dbconfig.php
fi
. /usr/share/dbconfig-common/dpkg/frontend.postinst
dbc_first_version="1:1.4.2-3"
dbc_generate_include=template:/etc/zabbix/dbconfig.php
dbc_generate_include_owner="root:www-data"
dbc_generate_include_perms="640"
dbc_generate_include_args="-U -o template_infile=/usr/share/doc/zabbix-frontend-php/dbconfig.php"
dbc_go zabbix-frontend-php $@
if [ "$1" = "configure" ]; then
# Is Apache installed?
if [ -x /etc/init.d/apache2 ]; then
# Has the user decided to have us configure apache2?
db_get zabbix-frontend-php/configure-apache || true
if [ "$RET" = "true" ]; then
if [ ! -f /etc/apache2/conf.d/zabbix ] && [ ! -h /etc/apache2/conf.d/zabbix ]; then
ln -s /etc/zabbix/apache.conf /etc/apache2/conf.d/zabbix
fi
fi
# Has the user decided to restart apache2?
db_get zabbix-frontend-php/restart-webserver || true
if [ "$RET" = "true" ]; then
# Restart Apache
invoke-rc.d apache2 restart
fi
fi
db_stop || true
fi
exit 0
|