freenetis-dhcp-github/deb/postrm @ 0bf25d49
c95784dc | Ondřej Fibich | #!/bin/sh
|
|
# FreenetIS-dhcp DEB: actions before uninstalling of package
|
|||
set -e
|
|||
. /usr/share/debconf/confmodule
|
|||
NAME=freenetis-dhcp
|
|||
CONFIGFILE=/etc/freenetis/freenetis-dhcp.conf
|
|||
# disable startup from update-rc.d
|
|||
set +e
|
|||
update-rc.d -f freenetis-dhcp 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
|