diff --git a/lib/pdns.sh b/lib/pdns.sh index 6481b40..a2ea6c7 100644 --- a/lib/pdns.sh +++ b/lib/pdns.sh @@ -83,6 +83,8 @@ for i in ns1 ns2 pdnsadmin powerdns traefik mail www computer panel nextcloud co curl -X PATCH --data "{\"rrsets\": [ {\"name\": \"\$i.$DOMAIN.\", \"type\": \"A\", \"ttl\": 86400, \"changetype\": \"REPLACE\", \"records\": [ {\"content\": \"$EXTERNALIP\", \"disabled\": false } ] } ] }" -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN. done +# TEST + # Create catchall A record for domain #curl -X PATCH --data '{"rrsets": [ {"name": "*.$DOMAIN.", "type": "A", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "$EXTERNALIP", "disabled": false } ] } ] }' -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.