From f90309513e8e2b86e7412e8a972eca4b9846e39f Mon Sep 17 00:00:00 2001
From: Oscar Najera <hi@oscarnajera.com>
Date: Sat, 21 Dec 2024 12:44:34 +0100
Subject: shepherd log rotation

---
 config/shepherd/init.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'config/shepherd')

diff --git a/config/shepherd/init.scm b/config/shepherd/init.scm
index 6b16623..60f67c7 100644
--- a/config/shepherd/init.scm
+++ b/config/shepherd/init.scm
@@ -2,6 +2,7 @@
 
 (use-modules ((ice-9 ftw) #:select (scandir))
              (shepherd service)
+             (shepherd service log-rotation)
              (srfi srfi-26))
 
 ;; Load all the files in the directory 'init.d' with a suffix '.scm'.
@@ -14,7 +15,12 @@
 ;; Send shepherd into the background
 (perform-service-action root-service 'daemonize)
 
+(register-services
+ (list
+  ;; Create a service that rotates log files once a week.
+  (log-rotation-service)))
+
 ;; Services to start when shepherd starts:
 ;; Add the name of each service that should be started to the list
 ;; below passed to 'for-each'.
-(start-in-the-background '(habit-logs roam-semantic-db))
+(start-in-the-background '(habit-logs roam-semantic-db log-rotation))
-- 
cgit v1.2.3