aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d/my-daemons.scm
blob: 6388850a06932eda183a5cb07c5a99f25c5184a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(register-services
 (make <service>
   #:docstring "Habit tracker"
   #:provides '(habit-logs)
   #:start (make-forkexec-constructor
            (list "sbcl"
                  "--load"
                  (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/habit.asd")
                  "--eval" "(asdf:load-system :habit)"
                  "--eval" "(habit-log::main)"
                  "--non-interactive")
            #:directory (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/")
            #:environment-variables (list (string-append "HABIT_DIR=" (getenv "HOME") "/org/habits/")
                                          "PORT=4242")
            #:log-file "/tmp/habits.log")
   #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
   #:respawn? #t))