From 55e73bf5237a130f35f79006a27b7577cbc612d2 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Wed, 20 Sep 2017 11:45:17 -0300 Subject: [PATCH] Fix provider case in dns hook script --- dehydrated-dns.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dehydrated-dns.sh b/dehydrated-dns.sh index 067d765..012c020 100755 --- a/dehydrated-dns.sh +++ b/dehydrated-dns.sh @@ -13,7 +13,7 @@ function deploy_challenge { echo "deploy_challenge called: ${DOMAIN}, ${TOKEN_FILENAME}, ${TOKEN_VALUE}" - if [ "$PROVIDER" == "POWERDNS" ]; then + if [ "${PROVIDER,,}" == "powerdns" ]; then lexicon $PROVIDER create ${DOMAIN} TXT --name="_acme-challenge.${DOMAIN}." --content="${TOKEN_VALUE}" --pdns-server ${LEXICON_POWERDNS_SERVER} else lexicon $PROVIDER create ${DOMAIN} TXT --name="_acme-challenge.${DOMAIN}." --content="${TOKEN_VALUE}" @@ -44,7 +44,7 @@ function clean_challenge { echo "clean_challenge called: ${DOMAIN}, ${TOKEN_FILENAME}, ${TOKEN_VALUE}" - if [ "$PROVIDER" == "POWERDNS" ]; then + if [ "${PROVIDER,,}" == "powerdns" ]; then lexicon $PROVIDER delete ${DOMAIN} TXT --name="_acme-challenge.${DOMAIN}." --content="${TOKEN_VALUE}" --pdns-server ${LEXICON_POWERDNS_SERVER} else lexicon $PROVIDER delete ${DOMAIN} TXT --name="_acme-challenge.${DOMAIN}." --content="${TOKEN_VALUE}"