Browse Source

Fix provider case in dns hook script

dehydrated-hook-powerdns
Fábio Kaiser Rauber 7 years ago
parent
commit
55e73bf523
  1. 4
      dehydrated-dns.sh

4
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}"

Loading…
Cancel
Save