summaryrefslogtreecommitdiffstats
path: root/scripts/service-add.sh
blob: 7710c949f88a677ac8bc9f503382b7a6ced2b735 (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
#!/bin/sh +x

. ./include.sh

json="{
    \"method\": \"service_add\",
    \"params\": [
        [
            \"ldap/test.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