2020-04-24 21:09:42 -04:00
|
|
|
#!/bin/bash
|
|
|
|
DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
|
|
|
|
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}"
|
2020-05-11 15:47:54 -04:00
|
|
|
[[ -z ${DOMAIN} ]] && export DOMAIN=${CERTBOT_DOMAIN}
|
2020-04-24 21:09:42 -04:00
|
|
|
knotc zone-begin ${DOMAIN}
|
2020-04-25 08:08:25 -04:00
|
|
|
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
|