prerm is in nagios3-core 3.5.1-1ubuntu1.3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/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
|