File: snmpd.postrm

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (36 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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