[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] if then else
From: |
Nick Upson |
Subject: |
[monit] if then else |
Date: |
Mon, 8 Mar 2010 13:52:34 +0000 |
I'm struggling to produce 2 different tests (monit 4.10)
1)
if a device (/dev/ttyUSB1) is present I need to create a file, if not
I need to delete a file
sounds simple but there does not seem to be a test for simple
existance of the device,
or treating it as a file sith a start & stop, I run into an issue
where it does a restart, ie both start & stop actions.
2) I need to test for the existance of a specific interface on the
machine (specifically ones named ppp)
and also create or delete a file
The best I have managed so far is to test for a host that should be on
the other end of that interface but I can't get the
if-then-else systax to work so the second part "create if it is
present" deosn't happen
- [monit] if then else,
Nick Upson <=