#!/bin/sh # postrm script for wowpreklad set -e apache_remove() { COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke disconf wowpreklad elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then rm -f /etc/apache2/conf.d/wowpreklad.conf fi rm -f /etc/apache2/conf-available/wowpreklad.conf } service_remove() { if [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then rm -f /etc/systemd/system/wowpreklad.service fi } if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then apache_remove $1 service_remove $1 fi exit 0