Hi all,

have I ever told you, that I love Liquidsoap?
The possiblities are incredible. And where possibilities are, there are 
problems.

My actual issue:
I am writing a kind of statistics by starting an external bash-script:

full = on_metadata(fun(meta) -> system("/home/musik/status_schreiben"),full)

This bash-script reads an XML-file, that Icecast2 creates automaticaly 
(domain:8000/admin/stats.xml).
Then it extracts the titles name and number of listeners and whatever I 
like. This works great with one exception:
The info in that named XML-file is not up-to-date. And to make it worse: 
>From time to time it is up-to-date.

I guess, this is because the calling and execution of the bash-script is 
a little bit faster then giving the metadata to Icecast.
Keeping that in mind it may be a good idea to wait a moment before 
starting the bash-script.
So my question: Is there a way to add some kind of delay to the calling 
of the bash-script? A few seconds should be enough. Or is there a 
possibility to add this delay into the bash-script?

----------------------------------------------------------------------------------------------------
echo "<mit_zeit>" >> /home/www/web6/html/stats/status.xml
echo "<datum>" >> /home/www/web6/html/stats/status.xml
date --date="today" "+%d.%m.%y" >> /home/www/web6/html/stats/status.xml
echo "</datum><zeit>" >> /home/www/web6/html/stats/status.xml
date --date="today" "+%H:%M:%S" >> /home/www/web6/html/stats/status.xml
echo "</zeit>" >> /home/www/web6/html/stats/status.xml
#
# Statistik-Tool
curl -u admin:secret http://welle303.de:8000/admin/stats.xml | grep -o 
"<listeners>.*</listeners>" >> /home/www/web6/html/stats/status.xml
curl -u admin:secret http://welle303.de:8000/admin/stats.xml | grep -o 
"<title>.*</title>" >> /home/www/web6/html/stats/status.xml
echo "</mit_zeit>" >> /home/www/web6/html/stats/status.xml
#
----------------------------------------------------------------------------------------------------

I hope, you understand, what I mean and you can help me again

Regards
Chricken

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to