Last active
August 29, 2015 14:00
-
-
Save marianogg9/11399155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart script to start/monitor app_gem service | |
start on startup | |
script | |
chdir /path/to/app_gem/dir | |
env PORT=port | |
env API_URL=url | |
env API_SSL=value | |
env API_USER=user | |
env API_PASSWORD=pass | |
env API_PORT=port | |
env NOAUTH=value | |
env SSL_ONLY=value | |
export PORT | |
export API_URL | |
export API_SSL | |
export API_USER | |
export API_PASSWORD | |
export API_PORT | |
export NOAUTH | |
export SSL_ONLY | |
exec > /tmp/app_gem.log 2>&1 | |
set -x | |
exec /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby /path/rvm/gems/ruby-2.0.0-p247/bin/app_gem | |
end script | |
# I tried # the first exec and/or executing the last line without the "exec", anyway it'll throw a 127 exit status for the main process. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try: