X-Git-Url: https://unix4lyfe.org/gitweb/darkstat-debian/blobdiff_plain/a1e8056c92203d02860d719abb1d562453896da8..b6069b5cedf32ffb61978dba984fba393be6038a:/debian/postinst diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..b3fb49d --- /dev/null +++ b/debian/postinst @@ -0,0 +1,37 @@ +#! /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 + +#DEBHELPER# + +exit 0