Hi !

Le samedi 12 septembre 2009 09:14:46, Mathijs Vos a écrit :
> Thanks for your reply, but the point is that there are running multiple
> scripts, which all have to start/stop at different times.
> If I'd stop icecast, everything would stop en that is not what I want.
> I
> could of course use cron to start / stop liquidsoap instances, however,
> that would introduce a whole lot of work maintaining all different
> start/stop times (times may change a few times per script per year). So
> if it's possible to do it via a script, it would be awesome :)

Well, intially liquidsoap was designed with the idea that it would never stop 
streaming. Hence the notion of infaillible sources and things like mksafe.

However, having the possibility for a source to stop streaming is planed for 
1.0 and should happen at some point, although I can't give you any estimated 
time.

In the mean time, you should be able to work around that by using the 
start/stop telnet commands to the icecast sources.

Even more, you can issue these commands from the script, using server.execute. 
So for instance, you could do:

def stop() = 
  if (some condition like 10h30) then
    ignore(server.execute("source_id.stop"))
  end
  20.
end

add_timeout(20.,stop)

This code will check every 20 seconds and stop the source if needed.

I did not test this code, but it should be a good starting point for what you 
want to do. Let me know if you need more informations.


Romain

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to