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, <[EMAIL PROTECTED]>
"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/>.
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp