services: clash: Add shepherd-provision configuration.

* rosenthal/services/child-error.scm (clash-configuration): Add field
shepherd-provision.
(clash-shepherd-service): Use it.
pull/2/head
Hilton Chain 1 year ago
parent 1c50972d30
commit a3d7639ccd
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292
  1. 11
      rosenthal/services/child-error.scm

@ -50,15 +50,22 @@
(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-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…
Cancel
Save