[Icecast] IceCast status - raw XML output

roed roed at poczta.onet.pl
Fri Mar 13 11:59:35 UTC 2015


Please add the following XSL file to IceCast distribution (web directory). It returns IceCast's state in raw XML form.

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
<xsl:output indent="yes" encoding="UTF-8" />
<xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
</xsl:template>
</xsl:stylesheet>

With this simple file it's easy to check IceCast's status in bath scripts. For example:

LISTENERS=`curl -sf http://icecastserver:59000/status-raw.xsl|xmllint --xpath "/*/source[@mount='/radiost']/listeners/text()" -`


-------------- next part --------------
A non-text attachment was scrubbed...
Name: status-raw.xsl
Type: text/xml
Size: 280 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20150313/e101d6a7/attachment.xml>


More information about the Icecast mailing list