[Icecast] script on connect

Pierpaolo gullˆa sviluppo at audiias.com
Sat Jan 17 13:37:02 PST 2009


Hi guys ,

I'm tryng to use the script on connect function of icecast.

This is my icecast xml files

<!-- This config file contains a minimal set of configurable parameters,
     and mostly just contains the things you need to change.  We created
     this for those who got scared away from the rather large and heavily
     commented icecast.xml.dist file. -->
<icecast>
    <limits>
        <sources>8</sources>
    </limits>
    <authentication>
        <source-password>123456</source-password>
        <relay-password>hackme</relay-password>
        <admin-user>admin</admin-user>
        <admin-password>hackme</admin-password>
    </authentication>
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
    </directory>
    <hostname>localhost</hostname>
    <listen-socket>
        <port>8000</port>
    </listen-socket>
    <fileserve>1</fileserve>
    <paths>
        <logdir>/var/log/icecast2</logdir>
        <webroot>/etc/icecast2/web</webroot>
        <adminroot>/etc/icecast2/admin</adminroot>
        <alias source="/" dest="/status.xsl"/>
    </paths>
    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
          <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>
    <mount>
        <mount-name>/testmount.ogg</mount-name>
       <password>hackme</password>
<!-- <authentication type="htpasswd"> -->
                <!--<option name="filename"
value="/var/www/icecast_auth/1.txt"/> -->
<!--<option name="allow_duplicate_users" value="1"/> -->
    <!-- </authentication> -->
<intro>/intro.ogg</intro>
        <stream-name>My audio stream</stream-name>
        <stream-description>My audio description <a
href="www.google.it">ciao</a></stream-description>
        <stream-url>http://some.place.com</stream-url>
        <genre>classical</genre>
        <bitrate>300</bitrate>
        <type>application/ogg</type>
<fallback-mount>/unsecondo_vhook.ogg</fallback-mount>
<on-connect>/etc/icecast2/bin/touch_connect</on-connect>
    </mount>
<security>
    <chroot>0</chroot>
    <changeowner>
        <user>icecast2</user>
        <group>icecast</group>
    </changeowner>
</security>
</icecast>

If you see , I call the bash script /etc/icecast2/bin/touch_connect

That is simply this

#!/bin/bash
touch /var/www/touch.touch

The script has 777 chmod permission and the directory /var/www/ have
permission to 777 -R .

How I can use this function or the function " on-disconnect " , that
doenst'work , too.

My icecast it's the 2.3.1 on my ybuntu 8.0.4 box.

Big thanks for the help

Best regards

Pierpaolo











More information about the Icecast mailing list