#!/bin/sh SNMP_USER="Debian-snmp" SNMP_GROUP="$SNMP_USER" set -e case "$1" in remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; purge) # if "snmp" is system user, it means Debian package created it. deluser --quiet --system snmp || true delgroup --quiet --system snmp || true # after 5.7.3+dfsg-2, Debian-snmp is used deluser --quiet --system $SNMP_USER || true delgroup --quiet --system $SNMP_GROUP || true rm -rf /var/lib/snmp/snmpd.conf* \ /var/run/agentx /var/agentx/master \ /var/run/snmpd.pid ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0