File: postrm

package info (click to toggle)
bindgraph 0.2a-6
  • links: PTS
  • area: main
  • in suites: sid
  • size: 292 kB
  • sloc: perl: 975; sh: 189; makefile: 8
file content (34 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
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
#!/bin/sh
set -e

DATADIR=/var/lib/bindgraph
CACHEDIR=/var/cache/bindgraph
DEFAULTS=/etc/default/bindgraph

case "$1" in
        purge)
		if [ -e /usr/share/debconf/confmodule ]; then
			. /usr/share/debconf/confmodule
			db_get bindgraph/stay_on_purge
			if [ "$RET" = "true" ]; then
				if [ -d $DATADIR ]; then rm -rf $DATADIR
				else rm -f $DATADIR/bindgraph.rrd
				fi
			fi
		fi
		rm -rf $CACHEDIR
		rm -f /etc/default/bindgraph
		rm -f /var/log/bind9-query.log
	;;

	remove)
		rm -rf $CACHEDIR
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0