#!/bin/sh -e

SVC="bind-exporter"

case "$1" in
    remove|purge)
        if [ -x /bin/systemctl -a -f /etc/systemd/system/${SVC}.service ] ; then
            if ! /bin/systemctl stop ${SVC} ; then
                echo "Cannot stop ${SVC} service!"
            fi
            if ! /bin/systemctl disable ${SVC} ; then
                echo "Cannot disable ${SVC} service!"
            fi
        fi
    ;;
esac
