services: nginx: Use nginx-action over inline gexp.

* gnu/services/web.scm (nginx-shepherd-service): Use the simpler
"nginx-action" helper, for the same reload side-effect.

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
EuAndreh via Guix-patches via 2022-10-17 17:57:18 -03:00 committed by Christopher Baines
parent 3c7d4fdc30
commit 117b0a65c8
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -820,13 +820,7 @@ (define (nginx-shepherd-service config)
(shepherd-action
(name 'reload)
(documentation "Reload NGINX configuration file and restart worker processes.")
(procedure
#~(lambda (pid)
(if pid
(begin
(kill pid SIGHUP)
(format #t "Service NGINX (PID ~a) has been reloaded." pid))
(format #t "Service NGINX is not running."))))))))))))
(procedure (nginx-action "-s" "reload"))))))))))
(define nginx-service-type
(service-type (name 'nginx)