3
# we attempt to stop nagios3 twice, once in nagios3-common's prerm
4
# and once here. otherwise, if nagios3+nagios3-common are being purged,
5
# the /usr/sbin/nagios3 binary could disappear before nagios3-common's
6
# prerm script runs, which would prevent it from being able to stop
8
if [ -x "/etc/init.d/nagios3" ]; then
9
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
10
invoke-rc.d nagios3 stop || true
12
/etc/init.d/nagios3 stop || true