Ok, here's the latest kludge:
Open the lms telnet cli with nc and subscribe to playlist events. The
sleep command keep the pipe open. Script just waits here on a "newsong"
event.
Code:
--------------------
(echo -e "b8:27:eb:94:ae:63 subscribe playlist"; sleep 1h) | nc 192.168.1.201
9090 | ./sod-npd-tripwire.sh
--------------------
Contents of the tripwire script:
Code:
--------------------
#!/bin/sh
while :
do
read line
if echo $line | grep newsong
then
break
fi
done
kill $(ps -ef | grep -m1 "sleep 1h" | cut -f1 -d " ")
--------------------
Receiving the text "newsong" breaks the tripwire and the main script
proceeds to check and regenerate images and/or song info text as
required. Then sets the tripwire again to wait for the next "newsong".
It's ugly but it seems to be working ok.
------------------------------------------------------------------------
sodface's Profile: http://forums.slimdevices.com/member.php?userid=19057
View this thread: http://forums.slimdevices.com/showthread.php?t=109694
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix