Last active
August 29, 2015 14:13
-
-
Save nhoffmann/16bb701da3a3c2349356 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
# /etc/init/rpush.conf - Rpush config | |
# This example config should work with Ubuntu 12+. It | |
# allows you to manage Rpush instances with | |
# Upstart, Ubuntu's native service management tool. | |
# | |
# Save this config as /etc/init/rpush.conf then mange rpush with: | |
# sudo start rpush app=/path/to/application | |
# sudo stop rpush app=/path/to/application | |
# sudo status rpush app=/path/to/application | |
# | |
# or use the service command: | |
# sudo service rpush {start,stop,restart} app=/path/to/application | |
# | |
description "Rpush Background Worker" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
# change deploy to match your deployment user if you want to use this as a less privileged user (recommended!) | |
setuid deploy | |
setgid deploy | |
respawn | |
respawn limit 3 30 | |
instance ${app} | |
script | |
chdir ${app} | |
logger -t rpush "Starting daemon: $app" | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
exec bundle exec rpush start -e staging | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment