diff options
Diffstat (limited to 'add_https.sh')
-rwxr-xr-x | add_https.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/add_https.sh b/add_https.sh new file mode 100755 index 0000000..0664796 --- /dev/null +++ b/add_https.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +for dom in alanpearce.{eu,uk} aln.pe; do + xh PATCH $POWERDNS_API_URL/api/v1/servers/localhost/zones/${dom}. \ + X-API-KEY:$POWERDNS_API_KEY <<JSON +{ + "rrsets": [ + { + "name": "${dom}.", + "type": "HTTPS", + "ttl": 86400, + "changetype": "REPLACE", + "records": [ + { + "content": "1 . alpn=h2" + } + ] + }, + { + "name": "www.${dom}.", + "type": "HTTPS", + "ttl": 86400, + "changetype": "REPLACE", + "records": [ + { + "content": "1 . alpn=h2" + } + ] + } + ] +} +JSON + +done |