Skip to content

Instantly share code, notes, and snippets.

@markhalliwell
Created March 20, 2015 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markhalliwell/4caac43f271a76849c5a to your computer and use it in GitHub Desktop.
Save markhalliwell/4caac43f271a76849c5a to your computer and use it in GitHub Desktop.
Create this file as /etc/init/bot.conf
# Drush Bot Service
description "Drush Bot"
author "Mark Carver <mark.carver@me.com>"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
respawn limit 2 5
expect fork
env DRUSH="/usr/local/bin/drush -y --root=/path/to/drupal/docroot --uri=http://example.com"
pre-start script
${DRUSH} bot-status-reset
end script
exec ${DRUSH} bot-start &
post-stop script
${DRUSH} bot-status-reset
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment