Skip to content

Instantly share code, notes, and snippets.

@KyleJamesWalker
Created April 22, 2014 23:14
Show Gist options
  • Save KyleJamesWalker/11197632 to your computer and use it in GitHub Desktop.
Save KyleJamesWalker/11197632 to your computer and use it in GitHub Desktop.
description "Hubot Slack bot"
# Slack-specific environment variables. Change these:
env HUBOT_SLACK_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaa
env HUBOT_SLACK_TEAM=example
env HUBOT_SLACK_BOTNAME=flash_gordan
env HUBOT_AUTH_ADMIN=admin
# Subscribe to these upstart events
# This will make Hubot start on system boot
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/home/user/hubot/'
env HUBOT='/home/user/hubot/bin/hubot'
env ADAPTER='slack'
env HUBOT_USER='user' # system account
env HUBOT_NAME='flash_gordan'
# Keep the process alive, limit to 5 restarts in 60s
respawn
respawn limit 5 60
exec start-stop-daemon --start -c ${HUBOT_USER} -d ${HUBOT_DIR} -x ${HUBOT} -- --name ${HUBOT_NAME} --adapter ${ADAPTER} >> /var/log/hubot.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment