mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 06:36:37 -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)
|
(define (mpd-shepherd-service config)
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(documentation "Run the MPD (Music Player Daemon)")
|
(documentation "Run the MPD (Music Player Daemon)")
|
||||||
|
(requirement '(user-processes))
|
||||||
(provision '(mpd))
|
(provision '(mpd))
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list #$(file-append mpd "/bin/mpd")
|
(list #$(file-append mpd "/bin/mpd")
|
||||||
"--no-daemon"
|
"--no-daemon"
|
||||||
#$(mpd-config->file config))
|
#$(mpd-config->file config))
|
||||||
#:pid-file #$(mpd-file-name config "pid")
|
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
;; Required to detect PulseAudio when run under a user account.
|
;; Required to detect PulseAudio when run under a user account.
|
||||||
(list (string-append
|
(list (string-append
|
||||||
|
@ -161,7 +161,7 @@ (define (mpd-service-activation config)
|
||||||
(define %user
|
(define %user
|
||||||
(getpw #$(mpd-configuration-user config)))
|
(getpw #$(mpd-configuration-user config)))
|
||||||
|
|
||||||
(let ((directory #$(mpd-file-name config "")))
|
(let ((directory #$(mpd-file-name config ".mpd")))
|
||||||
(mkdir-p directory)
|
(mkdir-p directory)
|
||||||
(chown directory (passwd:uid %user) (passwd:gid %user))))))
|
(chown directory (passwd:uid %user) (passwd:gid %user))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue