diff options
author | ache <ache@ache.one> | 2018-01-28 03:47:15 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-01-28 03:47:15 +0100 |
commit | ce9c927d72cfa805631601f716ede30306bfc72b (patch) | |
tree | 026a448d72b0ce5620283254b137b0fbe6e792a6 /functions/sec.fish | |
parent | Update git alias features (diff) | |
parent | Better sec (diff) |
End the merge
Diffstat (limited to 'functions/sec.fish')
-rw-r--r-- | functions/sec.fish | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/functions/sec.fish b/functions/sec.fish index 8a2b842..abf5edc 100644 --- a/functions/sec.fish +++ b/functions/sec.fish @@ -1 +1,8 @@ -alias sec='ssh achessh@37.59.109.240 -p 21 -D 8886 -fN' +function sec + set t (lsof -c ssh -i :8886 -a -Fp | grep "^p" | head -n 1 | cut -c 2-) + if [ -n "$t" -a "$t" != " +" ] + kill $t + end + ssh achessh@37.59.109.240 -p 21 -D 8886 -fN +end |