From f7193ea090891532ec5e6f2abbd6f805bdfbbf1f Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sat, 21 Dec 2024 12:30:38 +0100 Subject: update to shepherd 1.0 --- config/shepherd/init.d/my-daemons.scm | 45 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'config/shepherd/init.d/my-daemons.scm') diff --git a/config/shepherd/init.d/my-daemons.scm b/config/shepherd/init.d/my-daemons.scm index 1b5daf8..c235bfd 100644 --- a/config/shepherd/init.d/my-daemons.scm +++ b/config/shepherd/init.d/my-daemons.scm @@ -1,27 +1,26 @@ - -(register-services - (make - #: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)) - (let ((workdir (string-append (getenv "HOME") "/dev/dotfiles/scratch/semgrep/"))) (register-services - (make - #:docstring "Roam semantic DB" - #:provides '(roam-semantic-db) + (list + (service + '(habit-logs) + #:documentation "Habit tracker" + #: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 - interu pt process stream, ctrl-C + #:respawn? #t) + + (service + '(roam-semantic-db) + #:documentation "Roam semantic DB" #:start (make-forkexec-constructor (list "python" (string-append workdir "server.py")) @@ -29,4 +28,4 @@ #:environment-variables (list (string-append "PATH=" (getenv "HOME") "/.virtualenvs/language/bin")) #:log-file "/tmp/roam-semantic.log") #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C - #:respawn? #t))) + #:respawn? #t)))) -- cgit v1.2.3