Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
CamperVan & irssi wrapper script
#! /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