View Single Post
Old 19th February 2009, 00:25   #5
Major Dude
dopelabs's Avatar
Join Date: Oct 2006
Location: Silicon Valley
Posts: 539
Send a message via AIM to dopelabs
the following will start up services on boot, and will restart if it fails or crashes. ive tested this on freebsd 6 and 7, centos, macosx

a script that checks to see if the sc_serv is running, if it isnt, start it.

Create a file. name it whatever.. i call mine

put the following in it:


### Shoutcast (SC_SERV)

## SC_SERV Server 1
( ! ps auxwww | grep "/home/user/sc_serv/sc_serv /home/user/sc_serv/sc_serv.conf" | grep -v grep )
then echo "Shoutcast not running..."
/home/user/sc_serv/sc_serv /home/user/sc_serv/sc_serv.conf &

save and close the file

chmod 777

setup a cron job to run this script every 60 secs... mine looks like this:

*/1 * * * * /home/user/sc_serv/ >> /dev/null 2>&1

this will execute the script every 60 secs to check if shoutcast is running and will start it if its not.


dopelabs is offline   Reply With Quote