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
|
#!/bin/sh
# DJ: function to comment us out in httpd.conf
killconf () {
if
test -s /etc/apache/httpd.conf
then
tmpfile=/etc/apache/httpd.conf.tmp.$$
cat /etc/apache/httpd.conf |\
sed 's/^\(LoadModule.*mod_layout\.so\)/# \1/' > $tmpfile
mv -f $tmpfile /etc/apache/httpd.conf
ask_restart
fi
}
# Restart apache if user wants.
ask_restart () {
echo -n "An Apache module has been modified. Restart apache [Y/n]? "
read CONFIG
if [ ".$CONFIG" != ".n" -a ".$CONFIG" != ".N" ]
then
if [ -x /usr/sbin/apachectl ]; then
/usr/sbin/apachectl restart || true
else
echo 'apachectl not found.'
fi
fi
}
# This script is called twice during the removal of the package; once
# after the removal of the package's files from the system, and as
# the final step in the removal of this package, after the package's
# conffiles have been removed.
case "$1" in
remove)
# This package has been removed, but its configuration has not yet
# been purged.
killconf
:
;;
upgrade | deconfigure | failed-upgrade)
:
;;
*) echo "$0: didn't understand being called with \`$1'" 1>&2
exit 1;;
esac
#DEBHELPER#
exit 0
|