mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
services: mcron: Use match-record.
* gnu/services/mcron.scm (mcron-shepherd-services): Use match-record. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
6f4fd8f5b8
commit
edb398449f
1 changed files with 31 additions and 33 deletions
|
@ -143,11 +143,10 @@ (define (shepherd-schedule-action mcron files)
|
|||
(display line)
|
||||
(loop)))))))))
|
||||
|
||||
(define mcron-shepherd-services
|
||||
(match-lambda
|
||||
(($ <mcron-configuration> mcron ()) ;nothing to do!
|
||||
'())
|
||||
(($ <mcron-configuration> mcron jobs log? log-format)
|
||||
(define (mcron-shepherd-services config)
|
||||
(match-record config <mcron-configuration> (mcron jobs log? log-format)
|
||||
(if (eq? jobs '())
|
||||
'() ; nothing to do
|
||||
(let ((files (job-files mcron jobs)))
|
||||
(list (shepherd-service
|
||||
(provision '(mcron))
|
||||
|
@ -165,8 +164,8 @@ (define mcron-shepherd-services
|
|||
#~())
|
||||
#$@files)
|
||||
|
||||
;; Disable auto-compilation of the job files and set a
|
||||
;; sane value for 'PATH'.
|
||||
;; Disable auto-compilation of the job files and
|
||||
;; set a sane value for 'PATH'.
|
||||
#:environment-variables
|
||||
(cons* "GUILE_AUTO_COMPILE=0"
|
||||
"PATH=/run/current-system/profile/bin"
|
||||
|
@ -175,7 +174,6 @@ (define mcron-shepherd-services
|
|||
|
||||
#:log-file "/var/log/mcron.log"))
|
||||
(stop #~(make-kill-destructor))
|
||||
|
||||
(actions
|
||||
(list (shepherd-schedule-action mcron files)))))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue