![]() |
#1 |
Junior Member
Join Date: May 2007
Location: Hamilton, Ontario, CA
Posts: 9
|
Starting Shoutcast on Boot up
Hi, I have done lots of searching both in this forum and on the web for a sample on how to start my shoutcast server when my unix server reboots instead of I always having to SH into the server and start it up manually.
I did find a mac and something at the following link but its not working. http://forums.theplanet.com/index.ph...pic=13540&st=0 Can anyone point me to a topic some where which deals with this subject or a sample script? Many Thanks |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Dec 2003
Location: Saarland, Germany
Posts: 331
|
please delete
|
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Dec 2003
Location: Saarland, Germany
Posts: 331
|
Step 1:
Create a file named "shoutcast" with the following content in "/etc/init.d/" or download the attached file, rename, modify and copy it to "/etc/init.d/" (Full path "/etc/init.d/shoutcast"): code: Note: You have to edit the path to your SHOUTcast binary and your configuration file Step 2: Now you have to make the file executable: code: Step 3: Create the startup scripts with (Debian!): code: Step 4: Now your SHOUTcast server starts up everytime your server pass through its startup sequence. If your server is running, you can use code: or code: or code: to control your SHOUTcast server. Removing the SHOUTcast server from the startup sequence: Type this on your command line: code: greets, Michael TechnoBase.FM | HouseTime.FM | HardBase.FM | TranceBase.FM | CoreTime.FM | We aRe oNe |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: May 2007
Location: Hamilton, Ontario, CA
Posts: 9
|
Hi Garaoge, Many THANKS for the quick response and the script.
When I run this command: "update-rc.d shoutcast defaults" I get the error message: bash: update-rc.d: command not found. However, when I run "/etc/init.d/shoutcast start" the server starts. What should I be looking for? Thanks Fred |
![]() |
![]() |
![]() |
#5 |
Major Dude
|
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 sc_mon.sh put the following in it: code: save and close the file chmod 777 sc_mon.sh setup a cron job to run this script every 60 secs... mine looks like this: */1 * * * * /home/user/sc_serv/sc_mon.sh >> /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. cheers DopeLabs |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: May 2007
Location: Hamilton, Ontario, CA
Posts: 9
|
Hi dopelabs, Many THANKS, this script sure works. It was a headache for me having to manually restart my shoutcast server.
I running Unix Again Thanks Fred |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Jul 2017
Posts: 8
|
Its now 2018 and this won't work on centOS
remove " | grep -v grep " and it seems to work now for anyone in the future |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: May 2018
Posts: 31
|
|
![]() |
![]() |
![]() |
#9 | |
Major Dude
|
Quote:
the idea is only try to start IF its not running. when the script checks the list of running processes code: if sc_serv is running it will return 2 lines, one line that matches the sc_serv process and one line that matches the ps auxwww command that you just executed. if sc_serv is not running, it will return only the ps command you just executed, both resulting in a 'true' result. the script has a ! at the beginning which means do something if there are no results or 'false' result. if sc_serv is NOT running, then run it... and the only way it can tell if its NOT running is if you run code: the grep -v grep ensures that when running ps, it will not return itself as a running process... i hope that makes sense.. |
|
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Jun 2020
Posts: 1
|
startup help
hi i have installed steamcast but i was going to follow the script that i have on here but i have put it under a diffrent username how do i change the script to start it under a diffrent username
|
![]() |
![]() |
![]() |
#11 |
Major Dude
|
login with the different username and follow the same instructions
|
![]() |
![]() |
![]() |
#12 | |
Junior Member
Join Date: May 2022
Posts: 4
|
Quote:
This solution doesn't work for me. commands works (/etc/init.d/shoutcast start) but it doesn't start Shoutcast after reboot. Please tell me how I can make Shoutcast run automatically after reboot. Thanks |
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|