Skip to content

Commit

Permalink
bugfix force renewal
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Jan 9, 2025
1 parent b4ad266 commit 141ae27
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/modular/webserver/https/letsencrypt.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,26 @@
; certbot either needs to run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
; When using the webroot method the Certbot client places a challenge response inside domain.com/.well-known/acme-challenge/
; which is used for validation. When validation is complete, challenge file is removed from the target directory
(let [r (shell {:out :string}
(let [r (if force-renewal
(shell {:out :string}
"certbot" "certonly"
"--non-interactive" "--agree-tos"
"-m" email
"--webroot" "--webroot-path" webroot-path
"-d" domain
"--work-dir" work-path
"--config-dir" config-path
"--logs-dir" log-path
"--force-renewal")
(shell {:out :string}
"certbot" "certonly"
"--non-interactive" "--agree-tos"
"-m" email
"--webroot" "--webroot-path" webroot-path
"-d" domain
"--work-dir" work-path
"--config-dir" config-path
"--logs-dir" log-path
(when force-renewal
"--force-renewal"))]
"--logs-dir" log-path))]
;(info "renewal out: " (-> r :out))
;(info "first line: " (-> r :out str/split-lines first))
; first line: Account registered.
Expand Down

0 comments on commit 141ae27

Please sign in to comment.