Created
April 13, 2016 15:03
-
-
Save andrewebdev/7dd5e7dd91f7597c0cbf4bfeafc19404 to your computer and use it in GitHub Desktop.
Uses sockets to open connections to bitbucket
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 | |
case "$1" in | |
'start') echo "Starting SSH tunnel ..." | |
ssh -fTN git@bitbucket.org | |
;; | |
'check') echo "Checking if tunnel is active ..." | |
ssh -O check git@bitbucket.org | |
;; | |
'stop') echo "Stopping tunnel ..." | |
ssh -O exit git@bitbucket.org | |
;; | |
*) echo "Usage: start|stop|check" ;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment