Files
weewx/pkg/debian/postrm
2013-01-28 18:23:05 +00:00

35 lines
754 B
Bash
Executable File

#!/bin/sh -e
# $Id$
# postrm script for weewx debian package
# Copyright 2013 Matthew Wall
#
# ways this script might be invoked:
#
# postrm remove
# postrm purge
# old-postrm upgrade new-version
# disappearer's-postrm disappear overwriter overwriter-version
# new-postrm failed-upgrade old-version
# new-postrm abort-install
# new-postrm abort-install old-version
# new-postrm abort-upgrade old-version
. /usr/share/debconf/confmodule
if [ "$1" != remove -a "$1" != purge ]; then
exit 0
fi
# remove the startup configuration
update-rc.d weewx remove > /dev/null
# restart apache only if it was running
#invoke-rc.d apache2 status && invoke-rc.d apache2 restart
if [ "$1" = purge ]; then
# remove any debconf entries
db_purge
fi
exit 0