Created
December 16, 2012 16:01
-
-
Save jfalco/4308866 to your computer and use it in GitHub Desktop.
irc-connect
This file contains hidden or 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 | |
# If we get an argument, use it for ssh port, otherwise use default of 22 | |
if [ -n "$1" ] | |
then | |
port=$1 | |
else | |
port=22 | |
fi | |
host="<server IP or FQDN>" | |
# Call weechat's local rnotify | |
rnotify.tcl 4321 & | |
# ssh and attach | |
autossh -M 20000 $host -p $port -R 4321:localhost:4321 -t 'tmux attach -d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment