services: clash: Rotate logs.

* rosenthal/services/child-error.scm (clash-log-rotations): New procedure.
(clash-service-type): Extend rottlog-service-type with it.
pull/2/head
Hilton Chain 1 year ago
parent de09e5adc6
commit df1b070693
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292
  1. 8
      rosenthal/services/child-error.scm

@ -91,6 +91,10 @@
(delete-file config-dest))
(symlink #$config config-dest)))))
(define (clash-log-rotations config)
(list (log-rotation
(files (list (clash-configuration-log-file config))))))
(define clash-shepherd-service
(match-record-lambda <clash-configuration>
(clash log-file data-directory config shepherd-provision)
@ -121,7 +125,9 @@
(service-extension activation-service-type
clash-activation)
(service-extension account-service-type
(const %clash-accounts))))
(const %clash-accounts))
(service-extension rottlog-service-type
clash-log-rotations)))
(default-value (clash-configuration))
(description "Run Clash.")))

Loading…
Cancel
Save