diff options
Diffstat (limited to 'pdnsutil-update.sh')
-rw-r--r-- | pdnsutil-update.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pdnsutil-update.sh b/pdnsutil-update.sh new file mode 100644 index 0000000..6f46279 --- /dev/null +++ b/pdnsutil-update.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | zone=$1 | ||
4 | shift | ||
5 | host=$1 | ||
6 | shift | ||
7 | |||
8 | set -x | ||
9 | pdnsutil delete-rrset $zone $host A | ||
10 | for ip in "$@" | ||
11 | do | ||
12 | echo " Adding $ip" | ||
13 | pdnsutil add-record $zone $host A $ip | ||
14 | done | ||