12 lines
412 B
Bash
Executable File
12 lines
412 B
Bash
Executable File
#!/bin/bash
|
|
DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
|
|
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}"
|
|
[[ -z ${DOMAIN} ]] && export DOMAIN=${CERTBOT_DOMAIN}
|
|
knotc zone-begin ${DOMAIN}
|
|
knotc zone-set ${DOMAIN} _acme-challenge.${CERTBOT_DOMAIN}. 360 TXT ${CERTBOT_VALIDATION}
|
|
knotc zone-commit ${DOMAIN}
|
|
|
|
echo "${CERTBOT_VALIDATION}" > /tmp/certbot_validation_txt_${CERTBOT_DOMAIN}.txt
|
|
|
|
sleep 45
|