diff options
| author | Yelninei <yelninei@tutamail.com> | 2026-02-03 08:30:53 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-03-11 18:27:46 +0100 |
| commit | 6eb6971f4d721fc8d648323f0dbd52d0697b2a7b (patch) | |
| tree | 3f7a3a67aaaacc584f24e87622dee3e0d403f9b1 /gnu/services/dns.scm | |
| parent | 1ec777def84fcce9cfe77acb2ce3112b04b37085 (diff) | |
services: Add and use shepherd-signal-action.
* gnu/services/shepherd.scm (shepherd-signal-action): New procedure.
* gnu/services/audio.scm (mpd-shepherd-service): Use it for actions.
* gnu/services/base.scm (syslog-shepherd-service):
* gnu/services/base.scm (dnsmasq-shepherd-service):
* gnu/services/file-sharing.scm (transmission-daemon-shepherd-service):
* gnu/services/monitoring.scm (vnstat-shepherd-service):
* gnu/services/mail.scm (rspamd-shepherd-service):
* doc/guix.texi (shepherd-signal-action): Document it.
Change-Id: Ief5e00c7d430ec4aa28c3ef11d0ef9897793b45f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #6097
Diffstat (limited to 'gnu/services/dns.scm')
| -rw-r--r-- | gnu/services/dns.scm | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index 42a65a27677..e0cab485884 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -969,24 +969,16 @@ cache.size = 100 * MB (mkdir-p "/var/lib/misc"))) (define (dnsmasq-service-reload-action config) - (match-record config <dnsmasq-configuration> () - (shepherd-action - (name 'reload) - (documentation "Send a @code{SIGHUP} signal to @command{dnsmasq} to clear -cache and reload hosts files.") - (procedure #~(lambda (running) - (let ((pid (process-id running))) - (kill pid SIGHUP))))))) + (shepherd-signal-action + 'reload SIGHUP + #:documentation "Send a @code{SIGHUP} signal to @command{dnsmasq} to clear +cache and reload hosts files.")) (define (dnsmasq-service-stats-action config) - (match-record config <dnsmasq-configuration> () - (shepherd-action - (name 'stats) - (documentation "Send a @code{SIGUSR1} to write statistics to the system -log.") - (procedure #~(lambda (running) - (let ((pid (process-id running))) - (kill pid SIGUSR1))))))) + (shepherd-signal-action + 'stats SIGUSR1 + #:documentation "Send a @code{SIGUSR1} to write statistics to the system +log.")) (define dnsmasq-service-type (service-type |
