Yes Phusion Passenger 4 loads .bash_profile. It actually executes all
apps through "bash -l". This is because a lot of people set
environment variables in their bashrc/bash_profile, not knowing that
they wouldn't be inherited by the web server. We wanted that way to
set environment variables to work out of the box.
You should only run interactive stuff when there's a TTY. On most OSes
bash_profile is already written in such a way that some things only
start when there's a TTY. Your code could look like this:
if tty -s; then
$(gpg-agent --daemon)
fi
On Wed, May 8, 2013 at 5:33 PM, Jonathan Rochkind <
roch...@jhu.edu> wrote:
> Has Passenger between 3 and 4 changed how it loads the environment, and
> which .dotfiles it might load when forking an app?
>
> I had a .bash_profile with some interactive stuff in it (ssh-agent related),
> in the account that my app was running in.
>
> Under Passenger 3.x, this did not cause a problem.
>
> Under Passenger 4.0.2 -- I got an error from Passenger when trying to access
> the app, that it tried to start up the app but couldn't (error message being
> the "Enter passphrase" prompt from ssh-agent, yeah, if it's executing the
> .bash_profile that has that interactive stuff in it, of course it won't
> work).
>
> So, have things changed with regard to what dotfiles get executed on app
> launch in Passenger 3 to Passenger 4? Any docs on this, and on how I should
> think about it, and where I should put my stuff that really should only be
> for interactive shells and not for Passenger running on the same account?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
phusion-passen...@googlegroups.com.
> To post to this group, send email to
phusion-...@googlegroups.com.
> Visit this group at
>
http://groups.google.com/group/phusion-passenger?hl=en-US.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Phusion | Ruby & Rails deployment, scaling and tuning solutions
Web:
http://www.phusion.nl/
E-mail:
in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)