File: ganglia-monitor.postrm

package info (click to toggle)
ganglia 3.6.0-7
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 6,484 kB
  • ctags: 3,880
  • sloc: ansic: 27,874; sh: 11,052; python: 6,695; makefile: 565; perl: 366; php: 126; xml: 28
file content (20 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh -e

if [ "$1" = "purge" ] ; then
   # rm the rrds if this is the last ganglia package being removed.
   if [ ! -f /usr/sbin/gmetad ] ; then
        if [ -d /var/lib/ganglia ]; then
           	# Remove rrd dir
           	rm -rf /var/lib/ganglia/rrds
        fi
   # Only remove ganglia user if gmetad isn't installed
        if getent passwd ganglia >/dev/null; then
                userdel ganglia
        fi
        if getent group ganglia >/dev/null; then
                groupdel ganglia
        fi
    fi
fi

#DEBHELPER#