Skip to content

Instantly share code, notes, and snippets.

@AdamWhittingham
Created March 16, 2015 23:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AdamWhittingham/d5863d30d2ac492840d1 to your computer and use it in GitHub Desktop.
Save AdamWhittingham/d5863d30d2ac492840d1 to your computer and use it in GitHub Desktop.
Ubuntu Hubot Upstart Config
# hubot
description "Hubot Slack bot"
author "Adam Whittingham <emailaddress>"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/opt/hubot/kaytoo/'
env HUBOT='bin/hubot'
env ADAPTER='slack'
env HUBOT_USER='hubot'
env HUBOT_NAME='kaytoo'
# httpd listen port
env PORT='<YOUR PORT HERE>'
# Slack specific variables
env HUBOT_SLACK_TOKEN=<YOUR TOKEN HERE>
# Set the smallest path we can get away with!
env PATH=/opt/hubot/.nvm/v0.10.37/bin:/usr/local/bin:/usr/bin:/bin:/sbin
# Keep the process alive, limit to 5 restarts in 60s
respawn
respawn limit 5 60
exec start-stop-daemon --start --chuid ${HUBOT_USER} --chdir ${HUBOT_DIR} --exec ${HUBOT_DIR}${HUBOT} -- --name ${HUBOT_NAME} --adapter ${ADAPTER} >>/var/log/hubot.log 2>&1
@RKdev
Copy link

RKdev commented Apr 24, 2016

Thanks so much for posting this! It's exactly what I needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment