mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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.
This commit is contained in:
parent
7209d7cbc3
commit
bb124f6e9c
1 changed files with 2 additions and 2 deletions
|
@ -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))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue