[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: services: mpd: Fix daemon startup.
From: |
guix-commits |
Subject: |
03/04: services: mpd: Fix daemon startup. |
Date: |
Fri, 6 Nov 2020 17:34:27 -0500 (EST) |
civodul pushed a commit to branch version-1.2.0
in repository guix.
commit bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Nov 6 23:10:18 2020 +0100
services: mpd: Fix daemon startup.
Until now it would wait for a PID file that'd never come.
* gnu/services/audio.scm (mpd-shepherd-service): Add 'requirement'.
Remove #:pid-file from 'start'.
(mpd-service-activation): Create the ".mpd" directory since that's what
the daemon expects.
---
gnu/services/audio.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index 5729b6b..627b941 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -138,12 +138,12 @@ audio_output {
(define (mpd-shepherd-service config)
(shepherd-service
(documentation "Run the MPD (Music Player Daemon)")
+ (requirement '(user-processes))
(provision '(mpd))
(start #~(make-forkexec-constructor
(list #$(file-append mpd "/bin/mpd")
"--no-daemon"
#$(mpd-config->file config))
- #:pid-file #$(mpd-file-name config "pid")
#:environment-variables
;; Required to detect PulseAudio when run under a user account.
(list (string-append
@@ -161,7 +161,7 @@ audio_output {
(define %user
(getpw #$(mpd-configuration-user config)))
- (let ((directory #$(mpd-file-name config "")))
+ (let ((directory #$(mpd-file-name config ".mpd")))
(mkdir-p directory)
(chown directory (passwd:uid %user) (passwd:gid %user))))))