aboutsummaryrefslogtreecommitdiffstats
path: root/config/shepherd/init.d
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-03-01 18:46:28 +0100
committerOscar Najera <hi@oscarnajera.com>2023-03-03 11:54:47 +0100
commit3f0c451eb4f3571133c2c0f3a208de79b632de97 (patch)
tree6407c1f554824ae17631c99fa0ce9f47d3e1703d /config/shepherd/init.d
parent3e24c14dde0e8f83447a087cf6cf6bba4957a1a4 (diff)
downloaddotfiles-3f0c451eb4f3571133c2c0f3a208de79b632de97.tar.gz
dotfiles-3f0c451eb4f3571133c2c0f3a208de79b632de97.tar.bz2
dotfiles-3f0c451eb4f3571133c2c0f3a208de79b632de97.zip
habit tracker service daemon
Diffstat (limited to 'config/shepherd/init.d')
-rw-r--r--config/shepherd/init.d/my-daemons.scm15
1 files changed, 15 insertions, 0 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))