Files
EasyDNS/deploy/packaging/debian/postrm
T
2026-11-22 14:21:54 +01:00

19 lines
856 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
set -e
TOOLS="edns:easydns ed:easydig eh:easyhost ens:easynslookup etrace:easytrace ednssec:easydnssec eptr:easyptr ezone:easyzone econf:easyconf ebench:easybench ewhois:easywhois edoh:easydoh edot:easydot ediff:easydiff"
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
# remove only symlinks we created
for pair in $TOOLS; do
s="${pair%%:*}"; l="${pair##*:}"
if [ -L "/usr/bin/$s" ] && [ "$(readlink "/usr/bin/$s")" = "$l" ]; then rm -f "/usr/bin/$s"; fi
done
fi
if [ "$1" = "purge" ]; then
# /etc/easydns holds your zone files and keys: never deleted automatically
rm -f /etc/easydns/data/control.token
echo "EasyDNS purged. /etc/easydns (zones, keys, data) was kept – remove it manually if no longer needed."
fi
[ -d /run/systemd/system ] && systemctl daemon-reload >/dev/null 2>&1 || true
exit 0