27 lines
807 B
Bash
27 lines
807 B
Bash
#! /bin/sh
|
|
|
|
set -x
|
|
|
|
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 zoneminder
|
|
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
|
|
rm -f /etc/apache2/conf.d/zoneminder.conf
|
|
fi
|
|
rm -f /etc/apache2/conf-available/zoneminder.conf
|
|
# Reload the web server
|
|
deb-systemd-invoke reload apache2.service || true
|
|
}
|
|
|
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
|
# Deconfigure the web server
|
|
apache_remove $1
|
|
# No need to manually remove the zm database and user, dbconfig take care of this
|
|
fi
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|