diff options
author | crupest <crupest@outlook.com> | 2023-01-29 17:57:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-01-29 18:09:15 +0800 |
commit | 9605c91b63a9f837f352145ce67f901fe5387428 (patch) | |
tree | dc340c746884cb15eb1a29d7b282f4052a3fdf94 | |
parent | d5bfd474505a258c534938da695574e417571b48 (diff) | |
download | crupest-9605c91b63a9f837f352145ce67f901fe5387428.tar.gz crupest-9605c91b63a9f837f352145ce67f901fe5387428.tar.bz2 crupest-9605c91b63a9f837f352145ce67f901fe5387428.zip |
Fix auto certbot.
-rwxr-xr-x | docker/auto-certbot/daemon.bash | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docker/auto-certbot/daemon.bash b/docker/auto-certbot/daemon.bash index 7e30a7d..d79387e 100755 --- a/docker/auto-certbot/daemon.bash +++ b/docker/auto-certbot/daemon.bash @@ -55,14 +55,14 @@ for domain in "${domains[@]}"; do domain_options=("${domain_options[@]}" -d "$domain") done -options=("${domain_options[@]}") +options=(-n --agree-tos -m "$CRUPEST_EMAIL" --webroot -w /var/www/certbot "${domain_options[@]}") if [ -n "$CRUPEST_AUTO_CERTBOT_POST_HOOK" ]; then printf "You have defined a post hook:\n%s\n" "$CRUPEST_AUTO_CERTBOT_POST_HOOK" options=("${options[@]}" --post-hook "$CRUPEST_AUTO_CERTBOT_POST_HOOK") fi # Use test server to test. -certbot certonly -n --agree-tos --force-renewal --test-cert --dry-run -m "$CRUPEST_EMAIL" --webroot -w /var/www/certbot "${options[@]}" +certbot certonly --force-renewal --test-cert --dry-run "${options[@]}" function check_and_renew_cert { expire_info=$(openssl x509 -enddate -noout -in "$CRUPEST_CERT_PATH") @@ -96,8 +96,7 @@ function check_and_renew_cert { if [ -n "$CRUPEST_AUTO_CERTBOT_RENEW_COMMAND" ]; then $CRUPEST_AUTO_CERTBOT_RENEW_COMMAND else - - certbot renew -n --agree-tos -m "$CRUPEST_EMAIL" --webroot -w /var/www/certbot "${options[@]}" + certbot certonly "${options[@]}" fi fi } |