services: caddy: Reload by sending SIGUSR1 to the service.

* modules/rosenthal/services/web.scm (caddy-shepherd-services) [actions]:
Change reload action to send SIGUSR1 to the service.
This commit is contained in:
Hilton Chain 2026-03-28 12:44:31 +08:00
parent 79b5b07f83
commit a238fc8c28
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292

View File

@ -142,18 +142,7 @@
#~(make-kill-destructor))
(actions
(list (shepherd-configuration-action "/etc/caddy/Caddyfile")
(shepherd-action
(name 'reload)
(documentation "Reload Caddy configuration file.")
(procedure
#~(lambda (pid)
(if pid
(begin
(invoke "/run/privileged/bin/caddy" "reload"
"--config" "/etc/caddy/Caddyfile")
(display "Service caddy has been asked to \
reload its configuration file."))
(display "Service caddy is not running.")))))))
(shepherd-signal-action 'reload SIGUSR1)))
(auto-start? auto-start?)))))
(define caddy-service-type