[Top][All Lists]

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

Environment variables with start program

From: Mehul Ved
Subject: Environment variables with start program
Date: Thu, 20 Feb 2014 11:38:02 +0000


I have a node.js services that I want to be monitored by monit. I have written a bash script to start and stop these services. The script works fine when run from my bash console. But, it fails when run through monit, as explained on FAQ page that monit uses execv and thus environment variables are not available.

One of the workarounds that people have been using is:

/usr/bin/env KEY=value

Unfortunately, I can't use that since I have a lot of variables, some of which are quite long and thus exceed the 127 character limit.

Is there any other way I can have my environment variable available to the start program script?

reply via email to

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