nagios4/debian/nagios3-core.prerm

17 lines
492 B
Bash

#!/bin/sh -e
# we attempt to stop nagios3 twice, once in nagios3-common's prerm
# and once here. otherwise, if nagios3+nagios3-common are being purged,
# the /usr/sbin/nagios3 binary could disappear before nagios3-common's
# prerm script runs, which would prevent it from being able to stop
# the binary.
if [ -x "/etc/init.d/nagios3" ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d nagios3 stop || true
else
/etc/init.d/nagios3 stop || true
fi
fi
#DEBHELPER#