Forked from AdamWhittingham/gist:d5863d30d2ac492840d1
Created
September 28, 2015 21:26
-
-
Save emerleite/d4c6d513f7dd0f9ec30c to your computer and use it in GitHub Desktop.
Ubuntu Hubot Upstart Config
This file contains hidden or 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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment