[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#43921] [Shepherd PATCH 0/2] Add User Service example.

From: Jan Nieuwenhuizen
Subject: [bug#43921] [Shepherd PATCH 0/2] Add User Service example.
Date: Sun, 11 Oct 2020 11:40:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


Ever since Efraim's excellent blog post
( I have been
willing to try Shepherd's User Services (actually I wanted to try it for much
longer but it felt too daunting to dive in), and thanks to a nice discussion
on IRC this morning I finally gave it a go.

We were wondering it if would be feasible to add

--8<---------------cut here---------------start------------->8---
if [[ ! -S /run/user/$UID/shepherd/socket ]]; then  
--8<---------------cut here---------------end--------------->8---

to /etc/skel/.bash_profile, and maybe even add

--8<---------------cut here---------------start------------->8---
(use-modules (shepherd service)
             ((ice-9 ftw) #:select (scandir)))

;; Load all the files in the directory 'init.d' with a suffix '.scm'.
  (lambda (file)
    (load (string-append "init.d/" file)))
  (scandir (string-append (dirname (current-filename)) "/init.d")
           (lambda (file)
             (string-suffix? ".scm" file))))

;; Send shepherd into the background
(action 'shepherd 'daemonize)
--8<---------------cut here---------------end--------------->8---

that I got from Efraim's blog post.  For starters, I have put this
in the Shepherd manual.  WDYT?


Jan (janneke) Nieuwenhuizen (2):
  Use XDG_CACHE_HOME/shepherd for unprivileged users' log directory.
  Add User Service example.

 doc/shepherd.texi            | 75 +++++++++++++++++++++++++++++++++---
 modules/shepherd/support.scm | 15 +++++++-
 2 files changed, 83 insertions(+), 7 deletions(-)

Jan Nieuwenhuizen <> | GNU LilyPond
Freelance IT | Avatar®

reply via email to

[Prev in Thread] Current Thread [Next in Thread]