[pdns] Add records for plane so we don't rely on the wildcard

This commit is contained in:
Bernhard "bero" Rosenkränzer (Boggins) 2025-01-02 01:54:08 +01:00
parent 6097423325
commit 93d2ca6ba0

View File

@ -77,7 +77,7 @@ curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "MX", "ttl": 864
curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "TXT", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "\"v=spf1 mx a:$DOMAIN ~all\"", "disabled": false } ] } ] }' -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN. curl -X PATCH --data '{"rrsets": [ {"name": "$DOMAIN.", "type": "TXT", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "\"v=spf1 mx a:$DOMAIN ~all\"", "disabled": false } ] } ] }' -H 'X-API-Key: $PDNS_APIKEY' http://127.0.0.1:8081/api/v1/servers/localhost/zones/$DOMAIN.
# Create the A records for domain # Create the A records for domain
for i in ns1 ns2 pdnsadmin powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element vpn wireguard baserow gitea blog documentation castopod podcasts caddy calcom; do for i in ns1 ns2 pdnsadmin powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element vpn wireguard baserow gitea blog documentation castopod podcasts caddy calcom plane; do
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. 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 done
@ -106,7 +106,7 @@ start_pdns() {
# docker exec pdns pdnsutil set-kind $DOMAIN native # docker exec pdns pdnsutil set-kind $DOMAIN native
# docker exec pdns pdnsutil set-meta $DOMAIN SOA-EDIT-API DEFAULT # docker exec pdns pdnsutil set-meta $DOMAIN SOA-EDIT-API DEFAULT
# for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation calcom; do # for i in ns1 ns2 powerdns traefik mail www computer panel nextcloud collabora jitsi matrix element listmonk vaultwarden vpn wireguard baserow gitea blog documentation calcom plane; do
# docker exec pdns pdnsutil add-record $DOMAIN $i A 86400 $EXTERNALIP # docker exec pdns pdnsutil add-record $DOMAIN $i A 86400 $EXTERNALIP
# done # done