mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: herd: Use a smarter default for %shepherd-socket-file.
This makes it possible to use it for the privileged (root) user as well as an unprivileged user. * gnu/services/herd.scm (%shepherd-socket-file): Use /run/user/$uid/shepherd/socket when using an unprivileged user. Change-Id: I62cf358ffc233aba61cc64235c4b67c4fc944d2e
This commit is contained in:
parent
539066032a
commit
367d071bba
1 changed files with 4 additions and 1 deletions
|
@ -74,7 +74,10 @@
|
|||
;;; Code:
|
||||
|
||||
(define %shepherd-socket-file
|
||||
(make-parameter "/var/run/shepherd/socket"))
|
||||
(let ((uid (getuid)))
|
||||
(make-parameter (if (zero? uid) ;root
|
||||
"/var/run/shepherd/socket"
|
||||
(format #f "/run/user/~a/shepherd/socket" uid)))))
|
||||
|
||||
(define* (open-connection #:optional (file (%shepherd-socket-file)))
|
||||
"Open a connection to the daemon, using the Unix-domain socket at FILE, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue