[Top][All Lists]

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

Re: [monit] Monit and BackgroundRB

From: Ramon Miguel M. Tayag
Subject: Re: [monit] Monit and BackgroundRB
Date: Sun, 21 Sep 2008 17:49:45 +0800

Thanks Martin!  By absolute paths I suppose you mean:

start program = "/usr/bin/ruby
/home/ramon/app/current/script/backgroundrb start"

I get the exact same response :(  It starts if I do it through the
command line (but with "sudo" at the beginning) and "Execution failed"
if I use monit to start it.

On Sun, Sep 21, 2008 at 5:35 PM, Martin Pala <address@hidden> wrote:
> For security reasons monit purges the environment and only sets spartan PATH
> variable that contains /bin, /usr/bin, /sbin and /usr/sbin (see monit FAQ -
> Q6:
> The start program is not executed in shell - the arguments are given to
> execv(), thus the following construct in your configuration won't work:
> --8--
> start program = "/usr/bin/env
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin HOME=/home/ramon
> /usr/bin/ruby /home/ramon/app/current/script/backgroundrb start"
> --8--
> You have several options:
> 1.) you can use absolute paths in your startup script or put the PATH
> setting to the beginning of the script.
> 2.) you can wrap the start command in shell like this:
> start program = "/bin/bash -c '/usr/bin/env
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin HOME=/home/ramon
> /usr/bin/ruby /home/ramon/app/current/script/backgroundrb start'"
> Martin

Ramon Tayag

reply via email to

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