#!/bin/bash

set -e

case "$1" in
    remove|purge)
        # Reload systemd
        systemctl daemon-reload || true
        
        if [ "$1" = "purge" ]; then
            echo "Purging WildlifeSystems configuration..."
            # Remove configuration files
            rm -rf /etc/ws/ || true
        fi
        ;;
        
    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
        # Don't clean up on upgrade
        ;;
        
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
        ;;
esac

###DEBHELPER###

exit 0