갑자기 certbot renew 명령으로 인증서가 갱신되지 않는 문제 발생.
플러그인을 써서 진행햐아한다고 함.
dns 레코드를 수동으로 변경해야하는 상황에서 써야 함.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/도메인.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cannot extract OCSP URI from /etc/letsencrypt/archive/도메인/cert10.pem
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',)
Failed to renew certificate 도메인 with error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',)
-auth-hook.sh
#!/bin/bash
# 수동 인증용 manual-auth-hook 예시
RECORD="_acme-challenge.${CERTBOT_DOMAIN}"
echo "--------------------------------------"
echo "DNS에서 아래 TXT 레코드를 등록하세요:"
echo "도메인: ${RECORD}"
echo "값: ${CERTBOT_VALIDATION}"
echo "--------------------------------------"
# 로그로도 남김
echo "${RECORD} TXT ${CERTBOT_VALIDATION}" > "/tmp/${CERTBOT_DOMAIN}_dns_challenge.txt"
# DNS Propagation 대기(필요시 sleep, 혹은 직접 엔터)
read -p "DNS 등록 후 계속하려면 엔터를 누르세요..."
-cleanup-hook.sh
#!/bin/bash
# cleanup용(등록 기록 제거/알림)
RECORD="_acme-challenge.${CERTBOT_DOMAIN}"
echo "--------------------------------------"
echo "DNS에서 아래 TXT 레코드를 삭제하세요:"
echo "도메인: ${RECORD}"
echo "값: ${CERTBOT_VALIDATION}"
echo "--------------------------------------"
rm -f "/tmp/${CERTBOT_DOMAIN}_dns_challenge.txt"
read -p "TXT 삭제 후 계속하려면 엔터를 누르세요..."
-ssl_renew.sh
#!/bin/bash
DOMAIN="사용할 도메인"
CERTBOT="/usr/bin/certbot"
${CERTBOT} certonly --manual --preferred-challenges dns \
--manual-auth-hook "./auth-hook.sh" \
--manual-cleanup-hook "./cleanup-hook.sh" \
-d "${DOMAIN}"