[mod_python] how to set environment for shell

Deron Meranda deron.meranda at gmail.com
Mon Nov 6 16:08:22 EST 2006

On 11/6/06, Sells, Fred <fred at adventistcare.org> wrote:
> I need to run fop.sh as a shell command.  It needs the environment variable
> JAVA_HOME.  When I run fop.sh from the command line all is good,  when I run
> the same command using os.popen("..../fop.sh ......") the JAVA_HOME
> environment variable is not defined.

You can also just set environment variables inside the shell script
itself and not even mess with Apache or mod_python.  If you can't
modify that shell script, create a different wrapper shell script.

  export JAVA_HOME
  exec fop.sh

Deron Meranda

More information about the Mod_python mailing list