I have two servers, they're identical (I believe), production and staging servers.
And I have upstart script in /etc/init/
folder.
description "Discoure process"
setuid deploy
setgid deploy
respawn
respawn limit 3 30
start on runlevel [2345]
stop on runlevel [06]
script
exec /bin/bash <<'EOT'
echo "$HOME/.rbenv"
cd /home/deploy/discourse/current
bundle exec bluepill load config/discourse.pill --no-privileged --base-dir tmp/bluepill --logfile log/bluepill.log
EOT
end script
On the staging server it works well, but when I'm running that script on production server then the HOME variable is empty, the code echo "$HOME/.rbenv"
is evaluating to "/.rbenv"
What might be a problem here? Thanks