CamperVan & irssi wrapper script
This file contains 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
#! /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 |
This file contains 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
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