Portal Home > Knowledgebase > Articles Database > configure these


configure these




Posted by kteo, 02-04-2008, 04:13 PM
can someone help me to configure these script which will run a cron job every 5 minutes to test if the shoutcast server is running.....i want somenone to help me configure it for example for sc_serv_8010.conf which is running exactly in the root path...i mean in [~]- where are you going when you login as a root...there is the file sc_serv_8010.conf ...here is the script #!/bin/bash dte=`date +%d%b%Y` cd /where/ever/you/run/stuff/ ##--]] Check to see if sc_serv is running [[--## ps -ef|grep -v grep|grep sc_serv ]sc_serv_ok if [ -s sc_serv_ok ] then ##--]] Everything looks good, remove the file and exit [[--## rm -f sc_serv_ok exit 0 else ##--]] Log the error [[--## echo "Possible abend of sc_serv" ] sc_serv_prob_log.$dte ##--]] Email the log [[--## mail -s "sc_trans" your-email@domain-name.com [sc_serv_prob_log.$dte ##--]] Restart sc_serv [[--## cd /path/to/shoutcast/ ./sc_serv fi



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
SMTP OUTLOOK and CSF (Views: 521)