commit 3814be475685727c31513526f4b326767cd021df parent c826a1a499d3d247fd86851659eefc4fe6a33197 Author: Anders Damsgaard <anders.damsgaard@geo.au.dk> Date: Sat, 4 Jan 2014 09:28:38 +0100 autossh doesn't work right on OSX, so use regular ssh Diffstat:
M | bin/irssi.sh | | | 21 | +++++++++++++++++---- |
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/bin/irssi.sh b/bin/irssi.sh @@ -1,4 +1,17 @@ -#!/bin/sh -#ssh -t -p 12344 ircuser@susanoganders.dk 'screen -rd irssi' -#ssh -t -p 12344 ircuser@susanoganders.dk 'bin/tmux-irssi.sh' -autossh -t -p 12344 ircuser@susanoganders.dk 'bin/tmux-irssi.sh' +#!/bin/bash + +USER=ircuser +HOST=susanoganders.dk +PORT=12344 +POSTCMD=\'bin/tmux-irssi.sh\' + +UNAMESTR=`uname` +if [[ "$UNAMESTR" == 'Linux' ]]; then + autossh -t -p $PORT $USER@$HOST $POSTCMD +elif [[ "$UNAMESTR" == 'Darwin' ]]; then + ssh -t -p $PORT $USER@$HOST $POSTCMD +else + echo "Platform not supported" + exit 1 +fi +