Jump to content

Auto restarting Shoutcast 1.9.8


Recommended Posts

Been having a problem where Apache is restarting at 4am every day, which I haven't got to the bottom of, and I'm not really bothered about since it's starting up again fine. However, as my web interface starts sc_serv under the users account, the apache restart is also killing off any processes owned by that user (And I don't want to have to be up at 4am to restart Shoutcast.


There were no particular scripts around that would fit the bill (that were easily found on google), so I've cobbled one together that I thought I'd share.


PROCESS=`netstat -tulpn | grep :$PORT`
if [ "$PROCESS" = "" ]
# Not found - start process
./sc_serv 8000.conf &
echo "Shoutcast on port $PORT started at $(date)" >>/home/results.txt
# Found it - don't do anything
echo ""


If you don't know what to do with the script, or how to get it to run automatically check out my full post http://monkeypigs.com/blog/auto-restarting-shoutcast-1-9-8/

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...