monit-general
[Top][All Lists]
Advanced

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

Re: [monit] How to add a stop statement with parenthesis


From: Martin Pala
Subject: Re: [monit] How to add a stop statement with parenthesis
Date: Wed, 13 Jan 2010 22:47:35 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

you can use this:

  stop program = "/bin/bash -c 'kill -9 `cat /var/run/lircd.pid`'"


Regarding the process which shouldn't be started by monit on boot ... you can:

1.) either use monit's "startdelay" option which waits given number of seconds when monit is started:

  set daemon 5 with start delay 60

Note: startdelay option was added in monit 5.x

2.) or you can set the service to manual mode (enabled by service statement: "mode manual" and modify the your startup script to enable monitoring after service is started: "monit monitor foobar"


Regards,
Martin


John H wrote:
I need to stop a process by killing the process by viewing the pid
file process id.

/bin/kill -9 $(</var/run/lircd.pid)

When I view in the web interface all I see is

/bin/kill -9 $(

so I assume it's clipped the rest of the command

How do I do this? Guess I could write a bash script and call it if need be.

Also, I start some of my processes in another fashion so I'd like
monit to monitor the process but not start it on boot. Is this
possible?


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]