#! /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/13.15.3 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ] && [ -x "/etc/init.d/darkstat" ]; then update-rc.d darkstat defaults >/dev/null if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi invoke-rc.d darkstat $_dh_action || exit 1 fi fi # End automatically added section exit 0