From bb124f6e9c0af0a23736f233c2ea2c9c9b4a40a6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 6 Nov 2020 23:10:18 +0100 Subject: 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(-) (limited to 'gnu') 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 @@ (define (mpd-file-name config file) (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 @@ (define (mpd-service-activation config) (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)))))) -- cgit v1.2.3