#!/bin/sh
# 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

# abort if any command returns error
set -e

case "$1" in
remove)
        # remove the startup configuration
        update-rc.d -f weewx remove > /dev/null
        ;;

purge)
        # remove any debconf entries
        if [ -e /usr/share/debconf/confmodule ]; then
            . /usr/share/debconf/confmodule
            db_purge
        fi
        ;;

upgrade)
        ;;

abort-install)
        ;;

failed-upgrade)
        ;;

abort-install)
        ;;

abort-upgrade)
        ;;

esac

#DEBHELPER#

exit 0
