diff options
author | Max Christian Pohle | 2019-11-21 02:24:24 +0100 |
---|---|---|
committer | Max Christian Pohle | 2019-11-21 02:24:24 +0100 |
commit | d75b1edf651a755b6890c8dc85a2571799fe3e8a (patch) | |
tree | ef012bc69f532f4b08c44c69b46139e5aa708789 /pdnsutil-update.sh | |
parent | 1dcb4c6cc058800d8995bd3489ce840ff07055ec (diff) | |
download | pdnsupdate-master.tar.bz2 pdnsupdate-master.zip |
And added shell files to do the same thing as wsgi, but without network
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 | ||