PDA

View Full Version : Starting Shoutcast On Boot


summer
7th February 2006, 01:40
I love shoutcast. Just need to have it to boot up automatically. I have read the forums and see this is possible but am not sure how. I am using SuSE 9.2. I have read in the archives that you can use the init.d file to accomplish an automatic startup. I am using the sc_serv files plus the plugin for linux which is the sc_trans files. I'll need to start both the plugin and shoutcast. These files will need to start: shoutcast linux glib C6 files: sc_serv, sc_serv.conf. I am also using the plugin files from sc_trans_040: sc_trans_linux, and sc_trans.conf, and example.lst where I have my playlist set up. I have all these files installed in the /usr/local/shoutcast folder along with the mp3 files. What would my startup file need to say to start all this in init.d? After I write the startup file, I know that I need to copy this file into /etc/init.d and name it shoutcast. Then do the command /etc/init.d/shoutcast start to get it going. Just don't know what to put in the startup file. Can you help?? Please??

fc*uk
7th February 2006, 22:02
1. Open terminal.

2. 'man cron'

3. read the man page

yanosuke
28th February 2006, 23:14
OR you can just write the command to /etc/rc.local (as root)
(don't know if it works for a constantly running application, but i guess it's worth a try. Else, yes, use crontab.

hackerdork
1st March 2006, 00:10
try this on for size.

vi shoutcast.sh

#!/bin/sh
sc_serv sc_serv.conf >/dev/null &
sc_trans sc_trans.conf >/dev/null 2>&1 &

Save shoutcast.sh
chmod 755 shoutcast.sh

place shoutcast.sh in rc.local or do this

cd /etc/rc.local
or cd /etc/rc3.d

ln -s S99shoutcast /shoutcast.sh (that would be wherever you have placed shoutcast.sh)


voila

~HD
not too fancy of a script but it does work. I also use svscan (daemontools) to monitor the pids for sc_serv and sc_trans and restart them if they die.

Cheers.

fc*uk
1st March 2006, 00:26
indeed. there are a million ways to skin the same cat :)