|
|
@ -50,15 +50,22 @@ |
|
|
|
(clash |
|
|
|
(clash |
|
|
|
(file-like clash-bin) |
|
|
|
(file-like clash-bin) |
|
|
|
"The clash package.") |
|
|
|
"The clash package.") |
|
|
|
|
|
|
|
|
|
|
|
(log-file |
|
|
|
(log-file |
|
|
|
(string "/var/log/clash.log") |
|
|
|
(string "/var/log/clash.log") |
|
|
|
"Where the logs go.") |
|
|
|
"Where the logs go.") |
|
|
|
|
|
|
|
|
|
|
|
(data-directory |
|
|
|
(data-directory |
|
|
|
(string "/var/lib/clash") |
|
|
|
(string "/var/lib/clash") |
|
|
|
"Where to store data.") |
|
|
|
"Where to store data.") |
|
|
|
|
|
|
|
|
|
|
|
(config |
|
|
|
(config |
|
|
|
(file-like (plain-file "empty" "")) |
|
|
|
(file-like (plain-file "empty" "")) |
|
|
|
"Clash configuration file.") |
|
|
|
"Clash configuration file.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(shepherd-provision |
|
|
|
|
|
|
|
(list '(clash)) |
|
|
|
|
|
|
|
"A list of Shepherd service names (symbols) provided by this service.") |
|
|
|
(no-serialization)) |
|
|
|
(no-serialization)) |
|
|
|
|
|
|
|
|
|
|
|
(define %clash-accounts |
|
|
|
(define %clash-accounts |
|
|
@ -85,10 +92,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
(define clash-shepherd-service |
|
|
|
(define clash-shepherd-service |
|
|
|
(match-record-lambda <clash-configuration> |
|
|
|
(match-record-lambda <clash-configuration> |
|
|
|
(clash log-file data-directory config) |
|
|
|
(clash log-file data-directory config shepherd-provision) |
|
|
|
(list (shepherd-service |
|
|
|
(list (shepherd-service |
|
|
|
(documentation "Run clash.") |
|
|
|
(documentation "Run clash.") |
|
|
|
(provision '(clash)) |
|
|
|
(provision shepherd-provision) |
|
|
|
(requirement '(loopback networking)) |
|
|
|
(requirement '(loopback networking)) |
|
|
|
(start #~(make-forkexec-constructor |
|
|
|
(start #~(make-forkexec-constructor |
|
|
|
(list (let ((clash-meta-cmd |
|
|
|
(list (let ((clash-meta-cmd |
|
|
|