3 # https://stackoverflow.com/questions/2990414/echo-that-outputs-to-stderr
4 errcho
(){ >&2 echo "$@"; }
6 # run as root, obviously
7 if [ `id -u` != 0 ]; then
8 errcho
"This script needs to be run as root"
12 # revert what was done in setup.sh
15 # remove our crontab entry marked with '<AUTO_GENERATED_0TDNS_ENTRY>'
16 # we also remove the 'DO NOT EDIT' header, as in setup.sh
17 crontab
-l 2> /dev
/null |
18 grep -vE '^# DO NOT EDIT THIS FILE|^# \(- installed on .*\)|^# \(Cron version .*\)' |
19 grep -v '<AUTO_GENERATED_0TDNS_ENTRY>' | crontab
21 # if told to - also revert what was done in install.sh
22 if [ "x$1" = "x--delete-files" ]; then
24 rm -r /etc
/netns
/0tdns
*
25 rm /usr
/sbin
/hourly.py
27 rm /usr
/lib
/python
3/dist-packages
/ztdnslib.py