[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [monit] "if changed checksum then exec" not working
From: |
Joe Shang |
Subject: |
Re: [monit] "if changed checksum then exec" not working |
Date: |
Sat, 15 Nov 2008 14:20:24 -0600 |
Makes sense, thanks.
On Sat, Nov 15, 2008 at 2:18 PM, Martin Pala <address@hidden> wrote:
> The /usr/local/reimportconfig.sh most probably is executed but it most
> probably didn't succeeded.
>
> You can run monit with the -v option to see the tests progress and actions.
>
> The problem could be more likely the environment variables ... monit sets
> spartan environment for the executed programs, so the script may be missing
> some variables.
>
>
> FAQ.txt excerpt:
>
> 6. Q: I'm having trouble getting monit to execute any "start" or
> "stop" program commands. The log file says that they're being
> executed, and I can't find anything wrong when I run monit in
> verbose mode.
>
> A: Monit did start the program but for some reason the service dies
> later. Before we go on and introduce you to the fine art of
> system debugging, it's worth to note that:
>
> For security reasons monit purges the environment and only set a
> spartan PATH variable that contains /bin, /usr/bin, /sbin and
> /usr/sbin. If your program or script dies, the reason could be
> that it expects certain environment variables or to find certain
> programs via the PATH. If this is the case you should set the
> environment variables you need directly in the start or stop
> script called by monit.
>
>
>
> Joe Shang wrote:
>>
>> I have 5.0_beta4 , and using:
>>
>> check file httpd.conf
>> with path /usr/local/apache/conf/httpd.conf
>> if changed checksum
>> then exec "/usr/local/reimportconfig.sh"
>>
>> It does detect the change in "monit status" when there is a change ,
>> but it does not execute.
>>
>> If I run:
>>
>> /usr/local/reimportconfig.sh
>>
>> It does THEN execute what I wanted to execute with the above
>> parameters. My script has proper execution permissions, and it can
>> properly run as root.
>>
>> Is this a bug on monit, or am I missing something in my config?
>>
>> Pulling my hair abit on this one, I hope its a bug.
>>
>> Joe
>>
>>
>> --
>> To unsubscribe:
>> http://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
>