41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
|
#! /bin/sh
|
||
|
# postrm maintainer script for zoneminder-db package
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# Source the debconf stuff
|
||
|
if [ -f /usr/share/debconf/confmodule ]; then
|
||
|
. /usr/share/debconf/confmodule
|
||
|
fi
|
||
|
|
||
|
# Source the dbconfig stuff
|
||
|
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
|
||
|
. /usr/share/dbconfig-common/dpkg/postrm
|
||
|
# Ask the user what do to with dbconfig when removing the package
|
||
|
dbc_go zoneminder $@
|
||
|
fi
|
||
|
|
||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||
|
# Remove dbconfig stuff added in postinst script
|
||
|
rm -rf /usr/share/dbconfig-common/data/zoneminder
|
||
|
# No need to manually remove the zm database, dbconfig take care of this
|
||
|
fi
|
||
|
|
||
|
if [ "$1" = "purge" ]; then
|
||
|
# Delete a potential remaining file used in postinst script
|
||
|
rm -f /etc/zm/zm.conf.postinst.bak
|
||
|
fi
|
||
|
|
||
|
# Automatically added by dh_installdebconf
|
||
|
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||
|
. /usr/share/debconf/confmodule
|
||
|
db_purge
|
||
|
fi
|
||
|
# End automatically added section
|
||
|
|
||
|
|
||
|
# postrm rm may freeze without that
|
||
|
db_stop
|
||
|
|
||
|
exit 0
|