From 9a1cbf4f949a1166cb2dce6a57b6c5482516e628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Hu=CC=88bner?= Date: Sun, 14 Jan 2024 04:46:37 +0100 Subject: [PATCH] feat: update zones --- delete_records.sh | 22 ++++++++++++++++++++++ zones.yaml | 11 ++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 delete_records.sh diff --git a/delete_records.sh b/delete_records.sh new file mode 100644 index 0000000..a3d5ad7 --- /dev/null +++ b/delete_records.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +TOKEN="" +ZONE_ID= + +# EMAIL=me@gmail.com +# KEY=11111111111111111111111111 +# Replace with +# -H "X-Auth-Email: ${EMAIL}" \ +# -H "X-Auth-Key: ${KEY}" \ +# for old API keys + + +curl -s -X GET https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records?per_page=500 \ + -H "Authorization: Bearer ${TOKEN}" \ + -H "Content-Type: application/json" | jq .result[].id | tr -d '"' | ( + while read id; do + curl -s -X DELETE https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/${id} \ + -H "Authorization: Bearer ${TOKEN}" \ + -H "Content-Type: application/json" + done + ) diff --git a/zones.yaml b/zones.yaml index 432f5fe..692f7f5 100644 --- a/zones.yaml +++ b/zones.yaml @@ -12,6 +12,8 @@ jan-ole.de: "*.influx": 185.239.239.162 server3: 45.141.36.103 "*.server3": 45.141.36.103 + server2: 134.255.232.17 + "*.server2": 134.255.232.17 portainer: 185.239.239.162 "*.portainer": 185.239.239.162 music: 147.189.171.39 @@ -64,7 +66,14 @@ krewella.rocks: www: 185.223.31.112 jan-ole.tech: + txt: + "@": 70dcbb22ee584668a5cef68b058043c3 jan-ole.cloud: -ole.pink: \ No newline at end of file +ole.pink: + +narilah.live: + a: + "@": 76.76.21.21 + www: 76.76.21.21