Skip to content

Instantly share code, notes, and snippets.

@brianmed
Created May 23, 2016 23:50
Show Gist options
  • Save brianmed/55c6e85d6a2e4010383551e8a2752a94 to your computer and use it in GitHub Desktop.
Save brianmed/55c6e85d6a2e4010383551e8a2752a94 to your computer and use it in GitHub Desktop.
Minion upstart and CentOS
# Start when system enters runlevel 2 (multi-user mode).
start on runlevel 3
# Start delayed_job via the daemon control script.
exec su -c "/opt/perl script/app minion worker" bpm
# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn
pre-start exec sleep 4
post-stop exec sleep 3
# Give up if restart occurs 10 times in 90 seconds.
respawn limit 10 90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment