1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh -e
# postrm script for lighttpd
set -e
if [ "$1" = "purge" ]; then
rm -rf /var/log/lighttpd /run/lighttpd /var/cache/lighttpd
if [ -d /etc/lighttpd/conf-enabled/ ] ; then
# The loop below fixes #642494 (mostly)
for link in /etc/lighttpd/conf-enabled/*.conf ; do
target=$(readlink "$link") || true
if [ -n "$target" ] && [ ! -e "/etc/lighttpd/conf-enabled/$target" ] ; then
echo "removing dangling symlink $link ..."
rm -f $link
fi
done
fi
fi
#DEBHELPER#
exit 0
|