aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/shepherd/init.d/my-daemons.scm15
-rw-r--r--config/shepherd/init.scm2
2 files changed, 16 insertions, 1 deletions
diff --git a/config/shepherd/init.d/my-daemons.scm b/config/shepherd/init.d/my-daemons.scm
new file mode 100644
index 0000000..85de6d2
--- /dev/null
+++ b/config/shepherd/init.d/my-daemons.scm
@@ -0,0 +1,15 @@
+
+(register-services
+ (make <service>
+ #:docstring "Habit tracker"
+ #:provides '(habit-logs)
+ #:start (make-forkexec-constructor
+ (list "sbcl" "--load"
+ (string-append (getenv "HOME") "/.sbclrc")
+ "--load"
+ (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/habit.lisp")
+ "--eval" "(habit-log::main)" "--non-interactive")
+ #:directory (string-append (getenv "HOME") "/dev/common-lisp/todo-demo/")
+ #:log-file "/tmp/habits.log")
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:respawn? #t))
diff --git a/config/shepherd/init.scm b/config/shepherd/init.scm
index 7b548e9..d7f31b1 100644
--- a/config/shepherd/init.scm
+++ b/config/shepherd/init.scm
@@ -22,4 +22,4 @@
;; Services to start when shepherd starts:
;; Add the name of each service that should be started to the list
;; below passed to 'for-each'.
-(for-each start '())
+(for-each start '(habit-logs))