From c16cfe3e48ac9a3f55f9946022f6cae3794a92a5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 17 May 2022 21:58:35 -0700 Subject: [PATCH] Add shepherd and mcron services for some applications --- emacs/.config/shepherd/init.d/emacs.scm | 12 ++++++++++++ mbsync/.config/cron/mbsync.guile | 1 + mcron/.config/shepherd/init.d/mcron.scm | 13 +++++++++++++ xbindkeys/.config/shepherd/init.d/xbindkeys.scm | 12 ++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 emacs/.config/shepherd/init.d/emacs.scm create mode 100644 mbsync/.config/cron/mbsync.guile create mode 100644 mcron/.config/shepherd/init.d/mcron.scm create mode 100644 xbindkeys/.config/shepherd/init.d/xbindkeys.scm diff --git a/emacs/.config/shepherd/init.d/emacs.scm b/emacs/.config/shepherd/init.d/emacs.scm new file mode 100644 index 0000000..ae6b432 --- /dev/null +++ b/emacs/.config/shepherd/init.d/emacs.scm @@ -0,0 +1,12 @@ +(define emacs + (make + #:provides '(emacs) + #:docstring "Run `emacs --daemon'" + #:start (make-forkexec-constructor + '("emacs" "--fg-daemon") + #:log-file (string-append (getenv "HOME") "/.logs/emacs.log")) + #:stop (make-kill-destructor))) + +(register-services emacs) + +(start emacs) diff --git a/mbsync/.config/cron/mbsync.guile b/mbsync/.config/cron/mbsync.guile new file mode 100644 index 0000000..c802767 --- /dev/null +++ b/mbsync/.config/cron/mbsync.guile @@ -0,0 +1 @@ +(job '(next-minute) "mbsync --all --quiet --verbose") diff --git a/mcron/.config/shepherd/init.d/mcron.scm b/mcron/.config/shepherd/init.d/mcron.scm new file mode 100644 index 0000000..aed6673 --- /dev/null +++ b/mcron/.config/shepherd/init.d/mcron.scm @@ -0,0 +1,13 @@ +(define mcron + (make + #:provides '(mcron) + #:docstring "Run `mcron'" + #:start (make-forkexec-constructor + '("mcron") + #:log-file (string-append (getenv "HOME") "/.logs/mcron.log")) + #:stop (make-kill-destructor) + #:respawn? #t)) + +(register-services mcron) + +(start mcron) diff --git a/xbindkeys/.config/shepherd/init.d/xbindkeys.scm b/xbindkeys/.config/shepherd/init.d/xbindkeys.scm new file mode 100644 index 0000000..bd7dfc1 --- /dev/null +++ b/xbindkeys/.config/shepherd/init.d/xbindkeys.scm @@ -0,0 +1,12 @@ +(define xbindkeys + (make + #:provides '(xbindkeys) + #:docstring "Run `xbindkeys'" + #:start (make-forkexec-constructor + '("xbindkeys" "--nodaemon") + #:log-file (string-append (getenv "HOME") "/.logs/xbindkeys.log")) + #:stop (make-kill-destructor))) + +(register-services xbindkeys) + +(start xbindkeys)