Browse Source
Update dns_czechia.sh
fix(dns_czechia): reduce TTL to 60s to improve DNS propagation stability
pull/6764/head
CZECHIA-COM
7 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
dnsapi/dns_czechia.sh
|
|
|
@ -36,7 +36,7 @@ dns_czechia_add() { |
|
|
|
_info "Adding TXT record for $_h in zone $_cz" |
|
|
|
_h_esc=$(printf "%s" "$_h" | sed 's/\\/\\\\/g; s/"/\\"/g') |
|
|
|
_txt_esc=$(printf "%s" "$txtvalue" | sed 's/\\/\\\\/g; s/"/\\"/g') |
|
|
|
_body="{\"hostName\":\"$_h_esc\",\"text\":\"$_txt_esc\",\"ttl\":3600,\"publishZone\":1}" |
|
|
|
_body="{\"hostName\":\"$_h_esc\",\"text\":\"$_txt_esc\",\"ttl\":60,\"publishZone\":1}" |
|
|
|
export _H1="Content-Type: application/json" |
|
|
|
export _H2="AuthorizationToken: $_tk" |
|
|
|
if ! _res="$(_post "$_body" "$_url" "" "POST")"; then |
|
|
|
@ -67,7 +67,7 @@ dns_czechia_rm() { |
|
|
|
fi |
|
|
|
_h_esc=$(printf "%s" "$_h" | sed 's/\\/\\\\/g; s/"/\\"/g') |
|
|
|
_txt_esc=$(printf "%s" "$txtvalue" | sed 's/\\/\\\\/g; s/"/\\"/g') |
|
|
|
_body="{\"hostName\":\"$_h_esc\",\"text\":\"$_txt_esc\",\"ttl\":3600,\"publishZone\":1}" |
|
|
|
_body="{\"hostName\":\"$_h_esc\",\"text\":\"$_txt_esc\",\"ttl\":60,\"publishZone\":1}" |
|
|
|
export _H1="Content-Type: application/json" |
|
|
|
export _H2="AuthorizationToken: $_tk" |
|
|
|
_post "$_body" "$_url" "" "DELETE" >/dev/null |
|
|
|
|