File: nagios4-common.postrm

package info (click to toggle)
nagios4 4.3.4-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 21,592 kB
  • sloc: ansic: 94,759; sh: 12,454; perl: 2,624; makefile: 1,184; php: 365; ruby: 95
file content (29 lines) | stat: -rw-r--r-- 683 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
21
22
23
24
25
26
27
28
29
#!/bin/sh -e

# some shorthands for sanity
en="/etc/nagios4"
enc="/etc/nagios4/conf.d"
usn="/usr/share/nagios4"

case "${1}" in
    remove)
  	;;
    purge)
        for file in \
	    "${en}/resource.cfg" /var/log/nagios4 /var/run/nagios4 \
	    /var/lib/nagios4 /var/lib/nagios4/spool \
	    /var/lib/nagios4/spool/checkresults \
	    /var/lib/nagios4/rw
	do
	    dpkg-statoverride --force --remove "${file}" 2>/dev/null || true
	done
        rm -rf /var/run/nagios4 /var/log/nagios4 /var/lib/nagios4
	rm -f /etc/nagios4/conf.d/host-gateway_nagios4.cfg
	if which ucf >/dev/null 2>&1
	then
	      ucf --purge /etc/nagios4/conf.d/host-gateway_nagios4.cfg
	fi
    ;;
esac

#DEBHELPER#