Summary: | media-sound/mpd - new /etc/init.d/ script | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Zrajm C Akfohg <zrajm> |
Component: | Current packages | Assignee: | Christoph Mende (RETIRED) <angelos> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | avuton |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | new /etc/init.d/mpd |
Description
Zrajm C Akfohg
2007-06-05 21:16:20 UTC
Created attachment 121288 [details]
new /etc/init.d/mpd
New /etc/init.d/mpd start/stop script for Music Player Daemon.
"/etc/init.d/mpd stop" works even when/if MPD is hanged/unresponsive.
Also allows MPD's niceness to be specified in /etc/conf.d/mpd.
Well like, uh... wouldn't it make sense to fix the *real* bug that causes mpd to hang, instead of introducing such nasty hacks into the initscript? because (a) I could fix this myself, immediately, without involvement of others. (b) It will continue to work in the future, whether or not the bug in MPD gets fixed upstream. I had the same "hanging" problem with the initscript. The problem originated from two different scenarios: a) mpd crashes (but manages to remove it's pidfile) in this case the initscript is 'stubborn' and you have to zap mpd to be able to start it again. b) pidfile missing and mpd hangs (?), in this case, mpd --kill won't help you since pidfile is missing. I don't know why the file is missing (probably bad implementation within mpd). The solution I used was to start mpd with start-stop-daemon and the option '--no-daemon' with mpd. In this case the initscript handles the pidfile and mercilessly kills mpd weither it hangs or not. This also requires that you comment out the section with 'pid_file' in mpd.conf. so this is what I do to start mpd: start-stop-daemon --pidfile $MPD_PIDFILE --make-pidfile --background --start --exec /usr/bin/mpd -- --no-create-db --no-daemon and to stop: start-stop-daemon --stop --pidfile $MPD_PIDFILE --name mpd hope it helps! I might change it to s-s-d as soon as there's a hanging problem with mpd-0.14 (seems like the usual stop always helped me here), definitely not gonna use Zrajm's init script, so closing here |