mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-04 17:04:21 +00:00
services: home-goimapnotify-service-type: Add wait option.
* modules/rosenthal/services/mail.scm (home-goimapnotify-configuration): Add wait option. (home-goimapnotify-shepherd): Use it.
This commit is contained in:
parent
677b4962a0
commit
9e2dc3254d
@ -88,6 +88,9 @@
|
|||||||
(config
|
(config
|
||||||
yaml-config
|
yaml-config
|
||||||
"")
|
"")
|
||||||
|
(wait
|
||||||
|
(integer 1)
|
||||||
|
"")
|
||||||
(shepherd-provision
|
(shepherd-provision
|
||||||
(list-of-symbols '(goimapnotify))
|
(list-of-symbols '(goimapnotify))
|
||||||
"")
|
"")
|
||||||
@ -100,7 +103,7 @@
|
|||||||
|
|
||||||
(define home-goimapnotify-shepherd
|
(define home-goimapnotify-shepherd
|
||||||
(match-record-lambda <home-goimapnotify-configuration>
|
(match-record-lambda <home-goimapnotify-configuration>
|
||||||
(goimapnotify config shepherd-provision shepherd-requirement auto-start?)
|
(goimapnotify config wait shepherd-provision shepherd-requirement auto-start?)
|
||||||
(let ((config-file
|
(let ((config-file
|
||||||
(mixed-text-file "goimapnotify.yaml" (yaml-serialize config))))
|
(mixed-text-file "goimapnotify.yaml" (yaml-serialize config))))
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
@ -109,7 +112,8 @@
|
|||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(make-forkexec-constructor
|
||||||
(list #$(file-append goimapnotify "/bin/goimapnotify")
|
(list #$(file-append goimapnotify "/bin/goimapnotify")
|
||||||
"-conf" #$config-file)))
|
"-conf" #$config-file
|
||||||
|
"-wait" (number->string #$wait))))
|
||||||
(stop #~(make-kill-destructor))
|
(stop #~(make-kill-destructor))
|
||||||
(auto-start? auto-start?))))))
|
(auto-start? auto-start?))))))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user