|
|
|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
Senior Member
|
ah ha wonderful *nix... try the pkill command. eg.
this will kill all processes with the string "sc_serv" in the command string.code: Unique command strings recommended ofcourse
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2005
Posts: 20
|
I think that's just what I needed. Thanks
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|