I had a small problem using EsounD(esd) on a computer connected to me stereo. I wanted xmms on my other pcs to pipe to EsounD on the stereo computer, which it did; it's only that it would do it once, and then I would have to restart /etc/init.d/esound. Did a little searching on google and found that RedHat has some kind of problem that is similiar, in so much as the posts showed during my search.
Anywho: I decided to use the daemontools package's supervise to keep esd alive. so I made a /service/esd directory. and edited /services/esd/run:
Code: Select all
#!/bin/bash
source /etc/conf.d/esound
/usr/bin/esd -- $ESD_START $ESD_OPTIONS
Code: Select all
#!/sbin/runscript
depend() {
use net portmap alsasound
}
start() {
rm /service/esd/down
ebegin "Starting es daemon"
start-stop-daemon --start --quiet --background --exec /usr/bin/supervise -- /service/esd/
eend $?
}
stop() {
ebegin "Stopping es daemon"
touch /service/esd/down
/usr/bin/svc -kx /service/esd/
kill $(pidof esd)
eend $?
}
I supposed I should mention that this does succefully respawn esd; so now I can change tracks in xmms locally w/o ssh'ing to the box to restart esound.
Thoughts? Comments? Suggestions?

