Skip to content

Instantly share code, notes, and snippets.

@mattfield
Forked from attilaolah/campervan
Created October 17, 2013 11:56
Show Gist options
  • Save mattfield/7023601 to your computer and use it in GitHub Desktop.
Save mattfield/7023601 to your computer and use it in GitHub Desktop.
#! /usr/bin/env sh
RUBY_VERSION="1.9.1"
SERVER="${HOME}/.gem/ruby/${RUBY_VERSION}/bin/camper_van"
PIDFILE="/tmp/camper_van.pid"
if [ ! -e ${SERVER} ]; then
echo "CamperVan server not found at '${SERVER}'."
fi
function start_server {
echo "CamperVan server not running, starting it now."
"${SERVER}" &
echo $! >${PIDFILE}
sleep 2
}
if [ ! -e ${PIDFILE} ]; then
start_server
else
pid=`cat ${PIDFILE}`
if [ ! -e /proc/$pid -a /proc/$pid/exe ]; then
start_server
fi
fi
gnome-terminal -e irssi
servers = (
{
address = "127.0.0.1";
chatnet = "Campfire";
port = "6667";
autoconnect = "true";
password = "subdomain:token";
}
);
chatnets = {
Campfire = { type = "IRC"; };
};
channels = (
{ name = "#roomname"; chatnet = "Campfire"; autojoin = "yes"; }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment