mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-01-08 19:40:38 +00:00
services: clash: Add shepherd-provision configuration.
* rosenthal/services/child-error.scm (clash-configuration): Add field shepherd-provision. (clash-shepherd-service): Use it.
This commit is contained in:
parent
1c50972d30
commit
a3d7639ccd
@ -50,15 +50,22 @@ (define-configuration clash-configuration
|
||||
(clash
|
||||
(file-like clash-bin)
|
||||
"The clash package.")
|
||||
|
||||
(log-file
|
||||
(string "/var/log/clash.log")
|
||||
"Where the logs go.")
|
||||
|
||||
(data-directory
|
||||
(string "/var/lib/clash")
|
||||
"Where to store data.")
|
||||
|
||||
(config
|
||||
(file-like (plain-file "empty" ""))
|
||||
"Clash configuration file.")
|
||||
|
||||
(shepherd-provision
|
||||
(list '(clash))
|
||||
"A list of Shepherd service names (symbols) provided by this service.")
|
||||
(no-serialization))
|
||||
|
||||
(define %clash-accounts
|
||||
@ -85,10 +92,10 @@ (define clash-activation
|
||||
|
||||
(define clash-shepherd-service
|
||||
(match-record-lambda <clash-configuration>
|
||||
(clash log-file data-directory config)
|
||||
(clash log-file data-directory config shepherd-provision)
|
||||
(list (shepherd-service
|
||||
(documentation "Run clash.")
|
||||
(provision '(clash))
|
||||
(provision shepherd-provision)
|
||||
(requirement '(loopback networking))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list (let ((clash-meta-cmd
|
||||
|
Loading…
Reference in New Issue
Block a user