| View previous topic :: View next topic |
| Author |
Message |
n8tgc
Joined: 26 Feb 2008 Posts: 5
|
Posted: Fri Dec 26, 2008 10:34 pm Post subject: Start Ices at boot? Need help!! |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Dec 26, 2008 11:12 pm Post subject: |
|
|
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 |
|
 |
n8tgc
Joined: 26 Feb 2008 Posts: 5
|
Posted: Mon Dec 29, 2008 4:02 pm Post subject: |
|
|
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 |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Dec 29, 2008 4:34 pm Post subject: |
|
|
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 |
|
 |
jcr Modérateur français

Joined: 14 Apr 2006 Posts: 544 Location: France, Auvergne
|
Posted: Mon Dec 29, 2008 5:28 pm Post subject: |
|
|
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 |
|
 |
n8tgc
Joined: 26 Feb 2008 Posts: 5
|
Posted: Tue Dec 30, 2008 9:09 pm Post subject: |
|
|
Thank you both for your responses!
My Suse machines are now performing as desired.
 |
|
| Back to top |
|
 |
|