Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Start Ices at boot? Need help!!

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
n8tgc



Joined: 26 Feb 2008
Posts: 5

PostPosted: Fri Dec 26, 2008 10:34 pm    Post subject: Start Ices at boot? Need help!! Reply with quote

I am running Ices 2.0.1 on two OpenSUSE machines (10.3 & 11.0) and have the same problem on both. I cannot, successfully, get Ices to start upon boot. Neither Icecast nor Ices have an init script. I have these start commands in /etc/init.d/boot.local

/usr/local/bin/icecast -b -c /usr/local/etc/icecast.xml &
sleep 180s
/usr/local/bin/ices /usr/local/etc/Multiple.xml

Icecast will always load at bootup. However Ices will not. The Ices log always enters the following...

[2008-12-22 21:24:12] INFO ices-core/main IceS 2.0.1 started...
[2008-12-22 21:24:12] EROR input-oss/oss_open_module Failed to open audio device /dev/dsp: No such file or directory
[2008-12-22 21:24:12] EROR input/input_loop Couldn't initialise input module "oss"
[2008-12-22 21:24:12] INFO ices-core/main Shutdown complete

It appears that boot.local is running BEFORE the loading of devices is complete. As you can see I put in an "overkill" delay of 3 minutes to allow the devices to load. However, it appears that it delays EVERYTHING by that duration.

Is there another way to get Icecast AND Ices to load at boot up?

Anyone successfulle create init scripts to accomplish this? Or is there something I am doing wrong?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Dec 26, 2008 11:12 pm    Post subject: Reply with quote

You are stalling the bootup procedure by 180 seconds, you could do

.....icecast -b ....
(sleep 180; ..../ices .....) &

or you could separate the icecast and ices startups. In either case you'll want to make sure the ices is placed into the background.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
n8tgc



Joined: 26 Feb 2008
Posts: 5

PostPosted: Mon Dec 29, 2008 4:02 pm    Post subject: Reply with quote

By placing the sleep command on the same line as the ices startup command (seperated by the semi-colon) won't I still stalling the bootup process?

Also, pardon my lack of knowledge, but how can I seperate the icecast and ices commands at startup? Is not the bool.local where I would place the commands to process at bootup?

I suppose I could create a cron job to look for the presence of the ices process and start it if not already running...
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Dec 29, 2008 4:34 pm    Post subject: Reply with quote

the brackets and & starts a subshell in the background. Only the subshell will sleep. Control of the foreground process will be returned to the main bootup scripts.

Separating the scripts will mean using separate /etc/rc.d/init.d type scripts

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Mon Dec 29, 2008 5:28 pm    Post subject: Reply with quote

Why trying playing apprentice sorcerer, specially with opensuse. An icecast package with it's complete startup script, conformanat with oepnsuse start system exists in standard repositories.

For ices, simply create a file in /etc/init.d with your startup code. and add it with property 99 for start (this to be surte icecast has already started).
Use iceacst start/stop/restart mechanisme as a model do daemonize your ices.
opensuse uses slightly different mechanism than other linux distros. ie, your init scriot should have the followin coments in prefix (used by their autostart mechanism)
Code:

### BEGIN INIT INFO                                                           
# Provides:          ices                                                 
# Required-Start:    $syslog $remote_fs                                       
# Should-Start: $time ypbind sendmail                                         
# Required-Stop:     $syslog $remote_fs                                       
# Should-Stop: $time ypbind sendmail                                         
# Default-Start:     3 5                                                     
# Default-Stop:      0 1 2 6                                                 
# Short-Description: ices2 streaming client                               
# Description:       Start ices2 to stream ogg/mp3                         
#       (The Short-Description should already be a good hint.)               
### END INIT INFO                                                             

_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
n8tgc



Joined: 26 Feb 2008
Posts: 5

PostPosted: Tue Dec 30, 2008 9:09 pm    Post subject: Reply with quote

Thank you both for your responses!

My Suse machines are now performing as desired.

Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber