postrm is in ocsinventory-reports 2.0.5-1.1.
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 | #!/bin/sh
# postrm script for ocsinventory-reports
#
set -e
varpath="/var/lib/ocsinventory-reports"
confpath="/etc/ocsinventory"
conffile="ocsreports.conf"
if [ "$1" = purge ] ; then
rm -f $confpath/$conffile
rm -rf $varpath
fi
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
webserver="apache2"
if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/$conffile ]; then
rm -f /etc/$webserver/conf.d/$conffile
fi
if [ -f /etc/init.d/$webserver ] ; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d $webserver restart 3>/dev/null || true
else
/etc/init.d/$webserver restart 3>/dev/null || true
fi
fi
fi
exit 0
|