summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorYelninei <yelninei@tutamail.com>2026-02-03 08:30:53 +0000
committerLudovic Courtès <ludo@gnu.org>2026-03-11 18:27:46 +0100
commit6eb6971f4d721fc8d648323f0dbd52d0697b2a7b (patch)
tree3f7a3a67aaaacc584f24e87622dee3e0d403f9b1 /doc
parent1ec777def84fcce9cfe77acb2ce3112b04b37085 (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 'doc')
-rw-r--r--doc/guix.texi23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index b0ab0c1db5b..9924f4771f2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -50488,6 +50488,29 @@ cat $(herd configuration tor)
This can come in as a handy debugging tool!
@end deffn
+@deffn {Procedure} shepherd-signal-action name signal @
+[#:documentation `Send signal @var{signal} to the running service`] @
+[#:message `Service has been asked to perform @var{name}`]
+Return a shepherd action with @var{name} to send @var{signal} to the
+running process. The optional @var{documentation} and @var{message} can be used
+to customize the documentation and output message.
+
+Many daemons perform special actions after receiving a specific signal.
+
+For example the @command{syslogd} logger will reread its configuration file
+after receiving @code{SIGHUP}.
+
+After adding
+@lisp
+(shepherd-signal-action 'reload SIGHUP))
+@end lisp
+
+the @code{reload} action will be available and can be used with
+@example
+herd reload syslogd
+@end example
+@end deffn
+
@defvar shepherd-root-service-type
The service type for the Shepherd ``root service''---i.e., PID@tie{}1.