Created
December 9, 2019 03:25
-
-
Save mikfreedman/fea46985433d2aabe431569f5e3b64f4 to your computer and use it in GitHub Desktop.
Update namecheap Dynamic DNS and SSL for a given domain
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
#!/bin/bash | |
export NAMECHEAP_SOURCEIP="`ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'`" | |
export NAMECHEAP_USERNAME=".." | |
export NAMECHEAP_API_KEY=".." | |
export NAMECHEAP_DDNS_PASSWORD=".." | |
export HOSNTAME='..' | |
export DOMAIN='..' | |
curl "https://dynamicdns.park-your-domain.com/update?host=$HOSTNAME&domain=$DOMAIN&password=$NAMECHEAP_DDNS_PASSWORD&ip=$NAMECHEAP_SOURCEIP" | |
~/.acme.sh/acme.sh --issue --dns dns_namecheap -d $HOSTNAME.$DOMAIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment