Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Shoutcast Technical Support (http://forums.winamp.com/forumdisplay.php?f=86)
-   -   Use CRON to stop sc_serv (http://forums.winamp.com/showthread.php?t=258904)

Gorbymedia 4th November 2006 17:24

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

networknova 4th November 2006 17:32

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 :D

Gorbymedia 4th November 2006 22:20

I think that's just what I needed. Thanks


All times are GMT. The time now is 13:51.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.