Skip to content

Instantly share code, notes, and snippets.

@1stvamp
Created September 3, 2012 09:27
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 1stvamp/3608109 to your computer and use it in GitHub Desktop.
Save 1stvamp/3608109 to your computer and use it in GitHub Desktop.
Kludgy shell script to init hubot in a vagrant vm
#!/bin/bash
# Install steps
sudo sed -i -e 's#us.archive.ubuntu.com#gb.archive.ubuntu.com#g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y install redis-server python-software-properties build-essential g++ libssl-dev pkg-config
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get -y install nodejs nodejs-dev npm
if [ ! -d /var/log/hubot ]; then
sudo mkdir /var/log/hubot
fi
sudo chmod -R 777 /var/log/hubot
# Hubot config vars
export HUBOT_HIPCHAT_DEBUG=true
export HUBOT_HIPCHAT_PASSWORD=
export HUBOT_HIPCHAT_TOKEN=
# Run steps
pid=`pgrep hubot`
if [ "$pid" ]; then
kill -9 $pid
fi
cd /hubot
bin/hubot -a hipchat -n Professor Zombie &> /var/log/hubot/hubot.log
#bin/hubot -a sms -n Hubot &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment