Created
March 20, 2015 22:00
-
-
Save markhalliwell/4caac43f271a76849c5a to your computer and use it in GitHub Desktop.
Create this file as /etc/init/bot.conf
This file contains 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
# 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