prerm is in mono-xsp2 2.10-1build1.
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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/bin/sh
set -e
NAME=mono-xsp2
DESC="XSP WebServer"
#0 : false
#1 : true
should_stop() {
if [ -f /var/run/$NAME.pid ]; then
# Are we really running xsp2?
xsp2_pid=`cat /var/run/$NAME.pid`
xsp2_ps=`ps -p $xsp2_pid | wc -l`
# Are there any process running by that pid?
if [ "$xsp2_ps" = "2" ]; then
return 0
else
return 1
fi
fi
return 0
}
case "$1" in
remove)
# should we stop the server?
if should_stop ; then
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d mono-xsp2 stop
else
/etc/init.d/mono-xsp2 stop
fi
fi
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/mono-xsp2" ]; then
invoke-rc.d mono-xsp2 stop || exit $?
fi
# End automatically added section
exit 0
|