monit-general
[Top][All Lists]
Advanced

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

Re: [monit] File check with execution of a script


From: Martin Pala
Subject: Re: [monit] File check with execution of a script
Date: Wed, 24 Sep 2008 18:31:15 +0200

The file existence test is implicit - you can use just:

--8<--
check file filename with path /home/user/x
        start program = "xyz.sh start"
       stop program = "xyz.sh stop"
--8<--

... it will check for file existence and if it doesn't exist, the start script will be called


Martin


On Sep 24, 2008, at 3:56 PM, Julian Thomé wrote:

Hi at all,

I have a question about the file checks with monit.
Is it possible to check only the existence of a file with monit ?
In the Online Documentation there are a lot of Options like checksum, gid, ... etc. but i only want to check if a file exists.
Something in this kind ...

check file filename with path /home/user/x
        start programm = "xyz.sh start"
        stop programm = "xyz.sh stop"
        if failed uid root then restart

.

This script is syntactically correct but the effect does not coorespond to my conception. I would like to make the execution of a script dependent on the existence of a file.

Thank you in advance
Julian Thomé


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com


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





reply via email to

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