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 | 52df926f10dcafbf5df9dbf0a4b2cdc26874149a (patch) | |
| tree | dc340c746884cb15eb1a29d7b282f4052a3fdf94 /docker/auto-certbot | |
| parent | a98b97fa358a4329499a3c7788bda27053b3207e (diff) | |
| download | crupest-52df926f10dcafbf5df9dbf0a4b2cdc26874149a.tar.gz crupest-52df926f10dcafbf5df9dbf0a4b2cdc26874149a.tar.bz2 crupest-52df926f10dcafbf5df9dbf0a4b2cdc26874149a.zip  | |
Fix auto certbot.
Diffstat (limited to 'docker/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  }  | 
