aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/cuirass.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-06-12 23:30:53 +0200
committerLudovic Courtès <ludo@gnu.org>2017-06-12 23:34:14 +0200
commitd782de172c68119499202ddac03fdce53ad89a35 (patch)
tree47855e0ee9f9dea4d4e957bab173f3f2a0ba4c46 /gnu/services/cuirass.scm
parent254ea3f945e8bc44f8c3a4159302f24f4fe5f216 (diff)
downloadguix-d782de172c68119499202ddac03fdce53ad89a35.tar
guix-d782de172c68119499202ddac03fdce53ad89a35.tar.gz
services: cuirass: Extend rottlog with log rotations.
* gnu/services/cuirass.scm (cuirass-log-rotations): New procedure. (cuirass-service-type): Use it to extend ROTTLOG-SERVICE-TYPE.
Diffstat (limited to 'gnu/services/cuirass.scm')
-rw-r--r--gnu/services/cuirass.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 6beabc4b3b..88a9a86111 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -26,6 +26,7 @@
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu services shepherd)
+ #:use-module (gnu services admin)
#:use-module (gnu system shadow)
#:export (<cuirass-configuration>
cuirass-configuration
@@ -138,6 +139,13 @@
(chown #$cache uid gid)
(chown #$db uid gid))))))
+(define (cuirass-log-rotations config)
+ "Return the list of log rotations that corresponds to CONFIG."
+ (list (log-rotation
+ (files (list (cuirass-configuration-log-file config)))
+ (frequency 'weekly)
+ (options '("rotate 40"))))) ;worth keeping
+
(define cuirass-service-type
(service-type
(name 'cuirass)
@@ -145,6 +153,7 @@
(list
(service-extension profile-service-type ;for 'info cuirass'
(compose list cuirass-configuration-cuirass))
+ (service-extension rottlog-service-type cuirass-log-rotations)
(service-extension activation-service-type cuirass-activation)
(service-extension shepherd-root-service-type cuirass-shepherd-service)
(service-extension account-service-type cuirass-account)))))