summaryrefslogtreecommitdiffstats
path: root/scripts/dnszone-add.sh
blob: a506087d45ce05e0a04ddac5bdb5c006691e2126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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