Thanks - that moved me forward a bit.
These things are never that easy though, so I was then having a problem
where the log file just looped, saying;
2007-02-23 08:41:19.2120 Checking for lame in
/usr/local/SlimServer_v6.5.1/Bin/i86pc-solaris-thread-multi/lame
2007-02-23 08:41:19.2124 Checking for lame in
/usr/local/SlimServer_v6.5.1/Bin/solaris/lame
2007-02-23 08:41:19.2128 Checking for lame in
/usr/local/SlimServer_v6.5.1/Bin/lame
2007-02-23 08:41:19.2131 Checking for lame in /usr/sbin/lame
2007-02-23 08:41:19.2134 Checking for lame in /usr/bin/lame
2007-02-23 08:41:19.2137 Checking for lame in /usr/bin/lame
2007-02-23 08:41:19.2140 Checking for lame in /usr/local/bin/lame
2007-02-23 08:41:19.2143 Found binary /usr/local/bin/lame for lame
LAME: Can't get "TERM" environment string.
A set -x in mplayer.sh gave more info;
2007-02-23 08:41:19.1726 Checking for lame in /usr/local/bin/lame
2007-02-23 08:41:19.1729 Found binary /usr/local/bin/lame for lame
scriptpid=25801
apppid=/tmp/.alienbbc-app.25801.pid
app=/opt/csw/bin/mplayer
/usr/local/SlimServer_v6.5.1/Bin/mplayer.sh: bad substitution
2007-02-23 08:41:19.1996 Checking for lame in
/usr/local/SlimServer_v6.5.1/Bin/i86pc-solaris-thread-multi/lame
The cause of this was the following line in mplayer.sh;
if [ -e "${10}" ] ; then
The problem being that /bin/sh does not support test -e.
Changing the script shell to ksh fixed this.
My Bin/mplayer.sh now looks like;
#!/bin/ksh
scriptpid=$$
apppid=/tmp/.alienbbc-app.$$.pid
app=/opt/csw/bin/mplayer
#if [ -x /usr/local/bin/$app ] ; then
# app=/usr/local/bin/$app
#fi
# For mplayer pre6 comment out following line and uncomment line after
if [ -e "${10}" ] ; then
#if [ -e "${12}" ] || [ -e "${13}" ] ; then
echo Local File: Launching $app $1 $2 $3 $4 $5 $6 $7 $8 $9 "${10}"
${11} "${12}" "${13}" >&2
$app $1 $2 $3 $4 $5 $6 $7 $8 $9 "${10}" ${11} "${12}" "${13}" 3>&1
1>&2
exit
fi
echo Streaming: Launching $app $* >&2
(
$app $* 3>&1 1>&2 &
echo $! > $apppid
wait
rm -f $apppid
kill $scriptpid 2> /dev/null
) < /dev/null &
cat > /dev/null
if [ -s $apppid ] ; then
kill `cat $apppid` 2> /dev/null
fi
The plugin now works fine - many thanks for your help.
--
Blue_Atom
------------------------------------------------------------------------
Blue_Atom's Profile: http://forums.slimdevices.com/member.php?userid=7699
View this thread: http://forums.slimdevices.com/showthread.php?t=32994
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins