Le 20/10/2010 16:15, Josh Sharpe a écrit :
Thanks Eric, Rory,


So this works...
start program = "/bin/bash -c 'cd /some/path; VAR=blah rake ts:start'"

Which is 90% of the problem.  The other 10% is that rake should really
be executed as another user, not root.

So I tried this:

start program = "/bin/bash -c 'su - some_user -c \'cd /some/path;
VAR=blah rake ts:start\''"

Hello,
simply do :
start program = "/bin/su - user -c 'cd /some/path; VAR=blah rake ts:start'"

By logging to a user, you will load the environnement and use its shell 
recorded in /etc/passwd .
Certainly /bin/bash in your case.

Regards

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

Reply via email to