From a3d7639ccd2213a180868caca75e00ba23cce404 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sun, 26 Nov 2023 13:23:57 +0800 Subject: [PATCH] services: clash: Add shepherd-provision configuration. * rosenthal/services/child-error.scm (clash-configuration): Add field shepherd-provision. (clash-shepherd-service): Use it. --- rosenthal/services/child-error.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rosenthal/services/child-error.scm b/rosenthal/services/child-error.scm index e140e62..e7427f8 100644 --- a/rosenthal/services/child-error.scm +++ b/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 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