sean finney on 23 Sep 2009 04:43:56 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] correct way to do this in bash

On Wed, Sep 23, 2009 at 06:46:04AM -0400, Mag Gam wrote:
> What is the best way to kill and restart a process even if using cron?

the "best way" is for the script to record its pid into a file when it
starts, so you can do just kill `cat pidfile` (perhaps modulo some sanity
test for non-empty pidfile and non-existing process).  alternatively,
i'd suggest you look at the fine manual for pkill(1).


Attachment: signature.asc
Description: Digital signature

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --