Skip to content

Instantly share code, notes, and snippets.

@signed0
Created December 9, 2013 22:21
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 signed0/7882058 to your computer and use it in GitHub Desktop.
Save signed0/7882058 to your computer and use it in GitHub Desktop.
Upstart config file for Hubot using IRC
description "Hubot IRC bot"
# 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='/opt/hubot/'
env HUBOT='bin/hubot'
env LOGFILE='/dev/null'
env ADAPTER='irc'
env HUBOT_USER='hubot' # system account
env HUBOT_NAME='hubot' # what hubot listens to
# IRC variables
env HUBOT_IRC_SERVER='127.0.0.1'
env HUBOT_IRC_ROOMS="#room1,#room2"
env HUBOT_IRC_NICK='hubot'
# 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} -- --adapter ${ADAPTER} --name ${HUBOT_NAME} >> ${LOGFILE} 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment