monit-general
[Top][All Lists]
Advanced

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

Fwd: How Monit starts a process when a required file is ready?


From: Bin Zhu
Subject: Fwd: How Monit starts a process when a required file is ready?
Date: Mon, 28 Mar 2016 20:36:31 -0500

Hello,

Basically I want Monit to start a process "CAD" when a file "product_id" is ready. My config is as below:

**

check file product_id with path /etc/platform/product_id

if doesn not exist then alert

check process cad with pidfile /var/run/cad.pid

depends on product_id

start = "/bin/sh -c 'cd /home/root/cad/scripts;./run-cad.sh 2>&1 | logger -t
CAD'" with timeout 120 seconds

stop = "/bin/sh -c 'cd /home/root/cad/scripts;./stop-cad.sh 2>&1 | logger -t CAD'"

**

I’m expecting “monit” to call “start” until the file is available. But it seems it restarted the process (stop and start) every cycle.

Is there anything configured wrong here?

Appreciate any help.



reply via email to

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