postinst is in darkstat 3.0.715-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 | #! /bin/sh
# postinst script for darkstat
. /usr/share/debconf/confmodule
set -e
case "$1" in
configure)
if [ "$2" != "" ]; then
if dpkg --compare-versions "$2" lt "3.0.707-1"; then
# If the user answer "No" at the debconf question db_purge-2.5-1
# we don't come here
dbfile="/var/lib/darkstat/darkstat.db"
if [ -f $dbfile ]; then
echo -n "Removing darkstat database file $dbfile..."
rm -f $dbfile
echo "done."
fi
fi
fi
chown -R nobody /var/lib/darkstat
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/darkstat" ]; then
if [ ! -e "/etc/init/darkstat.conf" ]; then
update-rc.d darkstat defaults >/dev/null
fi
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
invoke-rc.d darkstat $_dh_action || exit $?
fi
# End automatically added section
exit 0
|