[Icecast] Running ices on startup

andre_grundmann at gmx.de andre_grundmann at gmx.de
Mon Sep 8 11:06:16 UTC 2008

Hi everyone.

I'm running icecast and ices2 on OpenSuse 10.2 (could upgrade to 11.0 in a breeze though).
What I'm trying to achieve right now is to use this for a kind of "baby-phone" functionality. 
That means:
1. There is a microphone attached to the server which records sound in the room
2. I'm in another room, listening to the server on Winamp, so I can hear what goes on in the room with the server

This works more or less fine, with one catch: icecast starts when I start the server, but ices doesn't. I have to start ices manually. This is unpleasant at least, so I would like to start ices on server startup. I already tried entering icecast into the runlevel manager and wrote a script to start it. What happens, is this:
Ices starts, if I run the script manually through the runlevel manager (runlevel manager reports success, and I hear sound), but after a bootup, no sound, although the runlevel manager still tells me ices is running. I can then still start ices manually, either using the script or running "ices /etc/ices.xml".

I had a similar setup with icecast and, I believe, oddsock on a Windows machine, and there I had the problem that icecast and the stream source would start concurrently, and the stream source couldn't find icecast, because it wasn't fully loaded yet. 

According to yast, icecast loads in runlevels 3 and 5, and ices loads in runlevel 5.

For good measure, the startup script:

test -x $ICES2_BIN || { echo "$ICES2_BIN not installed"; 
	if [ "$1" = "stop" ]; then exit 0;
	else exit 5; fi; }
# What you want to do when you start the script
start() {
  # put your commands here

# What you want to do when you stop the script
stop() {
  # put your commands here

case $1 in
	echo -n "Starting ices2 "
	## Start daemon with startproc(8). If this fails
	## the return value is set appropriately by startproc.
	/sbin/startproc $ICES2_BIN /home/mitarbeiter/icecast/ices.xml

	# Remember status and be verbose
	#rc_status -v
	echo -n "Shutting down ices2 "
	## Stop daemon with killproc(8) and if this fails
	## killproc sets the return value according to LSB.

	/sbin/killproc -TERM $ICES2_BIN

	# Remember status and be verbose
	#rc_status -v
    # put here what you want to display on status command
    echo "Usage: name of script {start|stop|restart|status}"

Essentially a modified icecast startup script.

Hope you folks can help me out.

GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!

More information about the Icecast mailing list