diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-11-06 23:10:18 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-11-06 23:10:18 +0100 |
commit | bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6 (patch) | |
tree | 9003565fa785b4f0e746ff1c21ce56c57bbf1469 | |
parent | 7209d7cbc37c108ca1148561a681258bb2222ab1 (diff) | |
download | guix-bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6.tar.gz |
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.
-rw-r--r-- | gnu/services/audio.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 5729b6bb0e..627b941871 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)))))) |