Created
May 7, 2021 12:40
-
-
Save yuchangyuan/952cfa6106b1ae68297da63859a13bc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apikey="API_KEY TO FILL" | |
function up_txt { | |
host="$1" | |
val="$2" | |
remote="https://zonomi.com/app/dns/dyndns.jsp" | |
url="${remote}?host=${host}&api_key=${apikey}&ttl=300&type=TXT&value=${val}" | |
#curl -k -s "$url" &> "/var/lib/letsencrypt/dns_txt.${host}.log" | |
python -c "import requests; print(requests.get(url='$url', verify=False).text)" &> "/var/lib/letsencrypt/dns_txt.${host}.log" | |
} | |
up_txt "_acme-challenge.$CERTBOT_DOMAIN" "$CERTBOT_VALIDATION" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment