mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: syslog: Simplify 'start' method.
This is a followup tod7113bb655
ande3358a831e
. * gnu/services/base.scm (syslog-service-type): Change 'start' method to set umask using the #:file-creation-mask parameter of 'make-forkexec-constructor' introduced in version 0.8.0 of the Shepherd. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
61586ce9a2
commit
4c0cc7bed3
1 changed files with 7 additions and 11 deletions
|
@ -1316,17 +1316,13 @@ (define syslog-service-type
|
|||
(documentation "Run the syslog daemon (syslogd).")
|
||||
(provision '(syslogd))
|
||||
(requirement '(user-processes))
|
||||
(start #~(let ((spawn (make-forkexec-constructor
|
||||
(list #$(syslog-configuration-syslogd config)
|
||||
"--rcfile"
|
||||
#$(syslog-configuration-config-file config))
|
||||
#:pid-file "/var/run/syslog.pid")))
|
||||
(lambda ()
|
||||
;; Set the umask such that file permissions are #o640.
|
||||
(let ((mask (umask #o137))
|
||||
(pid (spawn)))
|
||||
(umask mask)
|
||||
pid))))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list #$(syslog-configuration-syslogd config)
|
||||
"--rcfile"
|
||||
#$(syslog-configuration-config-file config))
|
||||
;; Set the umask such that file permissions are #o640.
|
||||
#:file-creation-mask #o137
|
||||
#:pid-file "/var/run/syslog.pid"))
|
||||
(stop #~(make-kill-destructor))))))
|
||||
|
||||
;; Snippet adapted from the GNU inetutils manual.
|
||||
|
|
Loading…
Reference in a new issue