certbot_knot_hooks/same-server-authenticator-h...

12 lines
412 B
Bash
Raw Normal View History

2020-04-24 21:09:42 -04:00
#!/bin/bash
DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}"
[[ -z ${DOMAIN} ]] && export DOMAIN=${CERTBOT_DOMAIN}
2020-04-24 21:09:42 -04:00
knotc zone-begin ${DOMAIN}
knotc zone-set ${DOMAIN} _acme-challenge.${CERTBOT_DOMAIN}. 360 TXT ${CERTBOT_VALIDATION}
knotc zone-commit ${DOMAIN}
2020-04-24 21:09:42 -04:00
echo "${CERTBOT_VALIDATION}" > /tmp/certbot_validation_txt_${CERTBOT_DOMAIN}.txt
2020-05-19 17:49:50 -04:00
sleep 45