[Mailman-Users] mailman watchdog - status report

Brad Knowles brad at stop.mail-abuse.org
Thu Dec 22 22:19:01 CET 2005


At 12:32 PM -0500 2005-12-22, Matt Emerson wrote:

>  if ps axw | grep -v grep | grep -v check-qrunner | grep qrunner >/dev/

	If you want to clean this up and not spawn so many uses of grep, 
you can try something like the following:

		if ps axw | egrep 'q[r]unner'

	This will have the same effect as the longer string above, so 
long as the script has the string "qrunner" somewhere in the name. 
If you want to understand why this works, check the man page for 
egrep.

	You could also start a script like this on boot or from cron, 
using locking to make sure there is only ever one copy of the program 
running, and then have it sleep for a reasonable period of time 
between checks.

-- 
Brad Knowles, <brad at stop.mail-abuse.org>

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."

     -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
     Assembly to the Governor, November 11, 1755

  LOPSA member since December 2005.  See <http://www.lopsa.org/>.



More information about the Mailman-Users mailing list