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
|
#!/bin/sh
set -e
reload_apache()
{
if apache2ctl configtest 2>/dev/null; then
invoke-rc.d apache2 restart || true
else
echo "Your apache2 configuration is broken, so we're not restarting it for you."
fi
}
#DEBHELPER#
if [ -n "$2" ]; then
# remove dangling symlinks from previous versions
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.8.0-2 ; then
for SYMLINK in mod-security.load mod-security.conf ; do
if [ -L "/etc/apache2/mods-enabled/$SYMLINK" ] && [ ! -e "/etc/apache2/mods-enabled/$SYMLINK" ] ; then
rm -f "/etc/apache2/mods-enabled/$SYMLINK"
fi
done
reload_apache
fi
fi
exit 0
|