Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
diy_rfc2136_dyndns_with_bind [29.10.2013 14:01] – Pascal Suter | diy_rfc2136_dyndns_with_bind [29.10.2013 14:27] – Pascal Suter | ||
---|---|---|---|
Line 79: | Line 79: | ||
</ | </ | ||
* now use the script to add your first hostname. < | * now use the script to add your first hostname. < | ||
+ | ===== script to remove hosts ===== | ||
+ | optionally you can also create a little script to remove hosts just as easily. create a file called remove_hosts.sh with the following contents< | ||
+ | #!/bin/bash | ||
+ | if [ -z " | ||
+ | echo " | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | cd / | ||
+ | hostname=${1}.dyn.mydomain.ch. | ||
+ | echo "old keys.conf entry: " | ||
+ | grep ${hostname} keys.conf | ||
+ | echo " | ||
+ | cat named.conf | sed -e "/ | ||
+ | cat keys.conf | sed -e "/^key ${hostname}.*$/ | ||
+ | echo " | ||
+ | / | ||
+ | echo " | ||
+ | grep "key " named.conf | awk '{ print $2; }' | tr -d ";" | ||
+ | </ | ||
+ | make it executable and run it to remove hotsts. **warning** make a backup of your keys.conf and your named.conf file before testing this :) | ||
+ | ./ | ||
+ |