mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 19:07:43 +00:00
Update dns_googledomains.sh
This commit is contained in:
parent
64b6f3df7a
commit
b30227d544
@ -24,7 +24,7 @@ dns_googledomains_add() {
|
|||||||
i=0
|
i=0
|
||||||
while [ $i -le "$(echo "$fulldomain" | grep -o '\.' | wc -l)" ]; do
|
while [ $i -le "$(echo "$fulldomain" | grep -o '\.' | wc -l)" ]; do
|
||||||
# join the domain parts from the current index to the end
|
# join the domain parts from the current index to the end
|
||||||
current_domain=$(echo "$fulldomain" | cut -d "." -f $((i+1))-)
|
current_domain=$(echo "$fulldomain" | cut -d "." -f $((i + 1))-)
|
||||||
|
|
||||||
# make a curl request to the URL and break the loop if the HTTP response code is 200
|
# make a curl request to the URL and break the loop if the HTTP response code is 200
|
||||||
response="$(_get "$GOOGLEDOMAINS_API/$current_domain")"
|
response="$(_get "$GOOGLEDOMAINS_API/$current_domain")"
|
||||||
@ -35,7 +35,7 @@ dns_googledomains_add() {
|
|||||||
_info "Found valid domain: $current_domain"
|
_info "Found valid domain: $current_domain"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
export _H1="Content-Type: application/json"
|
export _H1="Content-Type: application/json"
|
||||||
_post "{\"accessToken\":\"$GOOGLEDOMAINS_TOKEN\",\"keepExpiredRecords\":true,\"recordsToAdd\":[{\"digest\":\"$txtvalue\",\"fqdn\":\"$fulldomain\"}]}" "$GOOGLEDOMAINS_API/$current_domain:rotateChallenges" "" ""
|
_post "{\"accessToken\":\"$GOOGLEDOMAINS_TOKEN\",\"keepExpiredRecords\":true,\"recordsToAdd\":[{\"digest\":\"$txtvalue\",\"fqdn\":\"$fulldomain\"}]}" "$GOOGLEDOMAINS_API/$current_domain:rotateChallenges" "" ""
|
||||||
@ -51,7 +51,7 @@ dns_googledomains_rm() {
|
|||||||
i=0
|
i=0
|
||||||
while [ $i -le "$(echo "$fulldomain" | grep -o '\.' | wc -l)" ]; do
|
while [ $i -le "$(echo "$fulldomain" | grep -o '\.' | wc -l)" ]; do
|
||||||
# join the domain parts from the current index to the end
|
# join the domain parts from the current index to the end
|
||||||
current_domain=$(echo "$fulldomain" | cut -d "." -f $((i+1))-)
|
current_domain=$(echo "$fulldomain" | cut -d "." -f $((i + 1))-)
|
||||||
|
|
||||||
# make a curl request to the URL and break the loop if the HTTP response code is 200
|
# make a curl request to the URL and break the loop if the HTTP response code is 200
|
||||||
response="$(_get "$GOOGLEDOMAINS_API/$current_domain")"
|
response="$(_get "$GOOGLEDOMAINS_API/$current_domain")"
|
||||||
@ -61,6 +61,6 @@ dns_googledomains_rm() {
|
|||||||
echo "Found valid domain: $current_domain"
|
echo "Found valid domain: $current_domain"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user