summaryrefslogtreecommitdiffstats
path: root/scripts/dnszone-add.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dnszone-add.sh')
-rwxr-xr-xscripts/dnszone-add.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/dnszone-add.sh b/scripts/dnszone-add.sh
new file mode 100755
index 0000000..a506087
--- /dev/null
+++ b/scripts/dnszone-add.sh
@@ -0,0 +1,26 @@
+#!/bin/sh +x
+
+. ./include.sh
+
+# \"name_from_ip\": \"192.168.1.0/24\",
+json="{
+ \"method\": \"dnszone_add\",
+ \"params\": [
+ [ ],
+ {
+ \"name_from_ip\": \"FED0:0011:2233::/64\",
+ \"idnssoamname\": \"ns.example.com.\",
+ \"force\": true
+ }
+ ],
+ \"id\": 0
+}"
+
+curl\
+ -H "Content-Type: application/json"\
+ -H "Accept: applicaton/json"\
+ --negotiate -u :\
+ --cacert /etc/ipa/ca.crt\
+ -d "$json"\
+ -X POST\
+ $IPA_JSON_URL