Created
September 13, 2016 05:05
-
-
Save metalefty/e47ea7806ff4870194e0e2c7aae05703 to your computer and use it in GitHub Desktop.
letencrypt.sh の hook.sh で Route 53 を使って dns-01 する
This file contains hidden or 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
| #!/usr/local/bin/bash | |
| function deploy_challenge { | |
| local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}" | |
| cli53 rrcreate --wait --replace ${DOMAIN#*.} "_acme-challenge.${DOMAIN%%.*} 10 TXT ${TOKEN_VALUE}" | |
| } | |
| function clean_challenge { | |
| local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}" | |
| cli53 rrdelete ${DOMAIN#*.} _acme-challenge.${DOMAIN%%.*} TXT | |
| } | |
| function deploy_cert { | |
| local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}" | |
| } | |
| function unchanged_cert { | |
| local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" | |
| } | |
| HANDLER=$1; shift; $HANDLER $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment