Created
February 20, 2010 13:28
-
-
Save farhaven/309679 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
TUNNEL="ssh -NL3334:localhost:3334 [email protected]" | |
CMD= | |
if [ ! x$DISPLAY == x ]; then | |
CMD="urxvtc -name urxvt.irssi -e" | |
fi | |
if [ `screen -ls | grep -c Dead` -gt 0 ]; then | |
screen -wipe | |
fi | |
if [ `screen -ls | grep -c irssi` -gt 0 ]; then | |
$CMD screen -raAd irssi | |
else | |
nohup sh -c "while true; do $TUNNEL; sleep 2; done" & | |
sleep 2 | |
$CMD screen -S irssi -U irssi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment