postrm is in serendipity 1.5.3-2.
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | #!/bin/sh
set -e
purge_webserver_config () {
local package=$1
local webserver=$2
local prio=$3
local confdir
local wfile
case "$webserver" in
"lighttpd" )
confdir=conf-available
wfile=${prio}-$package.conf
;;
"apache2" )
confdir=conf.d
wfile=$package.conf
;;
* )
echo Webserver $webserver is not supported.
exit 1
;;
esac
if [ -d /etc/$webserver/$confdir ] && [ -L /etc/$webserver/$confdir/$wfile ] ; then
if [ ! -x /usr/sbin/$webserver ] ; then
echo "$webserver not installed, skipping"
else
rm /etc/$webserver/$confdir/$wfile
if [ "$webserver" = "lighttpd" ] ; then
lighty-disable-mod $package
fi
fi
fi
}
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go serendipity $@
fi
if [ "$1" = "purge" ]; then
for c in /etc/serendipity/database.inc.php /etc/serendipity/*.conf ; do
if [ -x /usr/bin/ucf ]; then
ucf --purge $c
fi
if [ -x /usr/bin/ucfr ]; then
ucfr --purge serendipity $c
fi
rm -f $c
done
supported_webservers_auto="apache2"
for webserver in ${supported_webservers_auto}; do
webserver=${webserver%,}
purge_webserver_config serendipity $webserver 50
reload="$reload $webserver"
done
for webserver in $reload; do
webserver=${webserver%,}
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d $webserver reload 3>/dev/null || true
else
/etc/init.d/$webserver reload 3>/dev/null || true
fi
done
echo
# remove cache and user data
rm -rf /var/cache/serendipity /var/lib/serendipity
fi
# Automatically added by dh_installdebconf
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_purge
fi
# End automatically added section
|