|
#!/bin/sh
|
|
# FreenetIS DEB: actions after uninstalling of package
|
|
|
|
set -e
|
|
. /usr/share/debconf/confmodule
|
|
|
|
NAME=freenetis-monitoring
|
|
CONFIGFILE=/etc/freenetis/freenetis-monitoring.conf
|
|
|
|
# disable startup from update-rc.d
|
|
set +e
|
|
update-rc.d -f freenetis-monitoring remove
|
|
set -e
|
|
|
|
# remove all configuration if purge
|
|
if [ "$1" = purge ]; then
|
|
# remove defconf values
|
|
if [ -e /usr/share/debconf/confmodule ]; then
|
|
db_purge
|
|
fi
|
|
# remove config files
|
|
rm -rf $CONFIGFILE
|
|
# remove dir if empty
|
|
[ "$(ls -A /etc/freenetis)" ] || rm -rf /etc/freenetis
|
|
fi
|
|
|
|
exit 0
|