Old 4th November 2006, 17:24   #1
Gorbymedia
Junior Member
 
Join Date: Sep 2005
Posts: 20
Use CRON to stop sc_serv

Hi all,

Wonder if a linux guru can help me. I want to run a specific linux shoutcast server for a specified time, basically to start on friday evening and finish monday morning.

I can easily start the server using cron, but struggling to find a way to stop.

I can manually type ps- ax | grep weekend

weekend being the name of the conf file I'm using and a good way for me to identify the specific sc_serv. However it reports back a couple of lines, the first begins with the pid of the sc_serv, the second is the pid of the grep search!

What shell/bash file could i use to help automate this part?

Many thanks, Richard
Gorbymedia is offline   Reply With Quote
Old 4th November 2006, 17:32   #2
networknova
Senior Member
 
Join Date: Mar 2005
Location: ontario
Posts: 402
Send a message via Yahoo to networknova
ah ha wonderful *nix... try the pkill command. eg.
code:
pkill sc_serv
this will kill all processes with the string "sc_serv" in the command string.
Unique command strings recommended ofcourse
networknova is offline   Reply With Quote
Old 4th November 2006, 22:20   #3
Gorbymedia
Junior Member
 
Join Date: Sep 2005
Posts: 20
I think that's just what I needed. Thanks
Gorbymedia is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump