All pastes #586332 Raw Edit

Mine

public text v1 · immutable
#586332 ·published 2007-06-23 19:43 UTC
rendered paste body
aga@prometheus:~/dev/mythplugins-trunk/ubuntu$ cat debian/mythweb.postrm
#!/bin/sh

set -e

reload_apache()
{
    if apache2ctl configtest 2>/dev/null; then
        invoke-rc.d apache2 force-reload || true
    else
        echo "Your apache2 configuration is broken, so we're not restarting it for you."
    fi
}

case "$1" in
    remove|purge)

        if [ -e /etc/apache2/apache2.conf ]; then
            a2dissite mythweb.conf >/dev/null || true
            reload_apache
        fi
    ;;

    upgrade|abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0