I've got a jukebox type programme streaming out through multiple Ices (0.4) sources, and an Icecast (2.2) server streaming to the listeners over the web. As a new user starts to play tracks on the jukebox, it writes a new ices.conf file (with the specific mountpoint, bitrate etc for that user) and spawns an instance of Ices to stream out that user's music. As it stands today Icecast knows nothing in advance about these new source clients, but doesn't need to as I have a standard login and password for Ices to connect to Icecast. I'd like to be able to add listener authentication, but the problem I have is that at the point of configuring and starting Icecast I don't know what the mountpoints or username/password combinations are going to be. I could get my jukebox to modify the icecast.conf file with the details of each new mountpoint and write the userid/password to the htauth file, but is it possible to then force Icecast to re-read the config file, and if so how? Thanks, James
On Tue, 2005-04-12 at 11:11, James McCurrach wrote:> I could get my jukebox to modify the icecast.conf file with the details > of each new mountpoint and write the userid/password to the htauth file, > but is it possible to then force Icecast to re-read the config file, and > if so how?you can send a HUP to icecast to force a re-read and assuming the stream isn't running at the time of the re-read then the setting should apply when the source client does connect. Updating the htpasswd file is probably best done via the icecast url interface so that you don't race I also have a working prototype for auth by URL, that way a new listener will cause a web request from icecast to be sent to a backend auth engine. This is only available in testing at the moment karl.
OK, so let me check I understand how the timing must work: 0) New user joins the jukebox and wants to start listening to music. Jukebox app selects a mountpoint name, user ID and password 1) Modify the icecast.conf file with the new mountpoint 2) Send HUP to icecast 3) Set up username:password for new stream 4) Create new stream's ices.conf file 5) Spawn new instance of ices to stream the music 6) Invite listener to start listening (tell him his userid, password, point him to url) ... When I send a HUP to icecast will it disrupt the listening experience of the other listening users on other streams? I'm not too keen on doing the password management via the admin interface as I really want this process to be automated and my php/xml isn't (yet) up to a dialogue with an external application - so maybe the auth by url is better. James On 4/12/2005, "Karl Heyes" <karl@xiph.org> wrote:>On Tue, 2005-04-12 at 11:11, James McCurrach wrote: > >> I could get my jukebox to modify the icecast.conf file with the details >> of each new mountpoint and write the userid/password to the htauth file, >> but is it possible to then force Icecast to re-read the config file, and >> if so how? > >you can send a HUP to icecast to force a re-read and assuming the stream >isn't running at the time of the re-read then the setting should apply >when the source client does connect. Updating the htpasswd file is >probably best done via the icecast url interface so that you don't race > >I also have a working prototype for auth by URL, that way a new listener >will cause a web request from icecast to be sent to a backend auth >engine. This is only available in testing at the moment > >karl. > >