blob: 60f67c7a1f15892e35aedc2ae8ee6ce2c108d452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
;; init.scm -- default shepherd configuration file.
(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'.
(for-each
(lambda (file)
(load (string-append "init.d/" file)))
(scandir (string-append (dirname (current-filename)) "/init.d")
(cut string-suffix? ".scm" <>)))
;; 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 log-rotation))
|