Skip to content

Instantly share code, notes, and snippets.

@RKdev
Last active April 24, 2016 19:25
Show Gist options
  • Save RKdev/426f0173b01d623a7bbc9ca52836524d to your computer and use it in GitHub Desktop.
Save RKdev/426f0173b01d623a7bbc9ca52836524d to your computer and use it in GitHub Desktop.
Hubot upstart config for AWS
# hubot
description "Hubot Slack bot"
author "Adam Whittingham <emailaddress> https://github.com/AdamWhittingham"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/home/ubuntu/dev/bishop/'
env HUBOT='bin/hubot'
env ADAPTER='slack'
env HUBOT_USER='ubuntu'
env HUBOT_NAME='bishop'
# httpd listen port
env PORT='<port #>'
# Slack specific variables
env HUBOT_SLACK_TOKEN=<Your Token Broham>
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment