Blob Blame History Raw
#!/bin/sh
#Wrapper script for solfege to ensure that the esound daemon is running
solfegebin="/usr/libexec/solfege-bin"
esdpid=`/sbin/pidof -o %PPID /usr/bin/esdcompat`
#check if esd is running
if [ -z $esdpid ] 
then
#start esound daemon, terminate it when all client close
esdcompat -nobeeps &
echo $!> ~/.solfege-esd.pid
fi
#start solfege
$solfegebin
#if esd was invoked, close it
if [ -e ~/.solfege-esd.pid ]
then
kill -9 `cat ~/.solfege-esd.pid` && rm -f ~/.solfege-esd.pid
fi