From 2c67e98b37e5b73c6abbadce59698bc4df3ce783 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 12 Apr 2023 15:44:02 -0400 Subject: services: syslog: Add a reload action. * gnu/services/base.scm (syslog-service-type) [actions]: Add a reload action. * doc/guix.texi (Base Services): Document it. --- gnu/services/base.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 3b0784ef07..7ef6db8ad4 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1549,7 +1549,21 @@ Service Switch}, for an example." (documentation "Run the syslog daemon (syslogd).") (provision '(syslogd)) (requirement '(user-processes)) - (actions (list (shepherd-configuration-action syslog.conf))) + (actions + (list (shepherd-configuration-action syslog.conf) + (shepherd-action + (name 'reload) + (documentation "Reload the configuration file from disk.") + (procedure + #~(lambda (pid) + (if pid + (begin + (kill pid SIGHUP) + (display #$(G_ "Service syslog has been asked to \ +reload its settings file."))) + (display #$(G_ "Service syslog is not running.")))))))) + ;; Note: a static file name is used for syslog.conf so that the reload + ;; action work as intended. (start #~(let ((spawn (make-forkexec-constructor (list #$(syslog-configuration-syslogd config) #$(string-append "--rcfile=" syslog.conf)) -- cgit v1.2.3 ackages/dhall.scm'>
path: root/gnu/packages/dhall.scm
AgeCommit message (Expand)Author