summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-11-16 21:47:14 +0100
committerache <ache@ache.one>2017-11-16 21:47:14 +0100
commitb90b805b41205dc65872c570ea26acb283106620 (patch)
treee0ada42ca3e82ed1a8dadfa10ee5e8cbf5a5a29a /functions
parentTodo fix (diff)
Better sec
Diffstat (limited to 'functions')
-rw-r--r--functions/sec.fish9
1 files changed, 8 insertions, 1 deletions
diff --git a/functions/sec.fish b/functions/sec.fish
index 3dda398..4f87d4e 100644
--- a/functions/sec.fish
+++ b/functions/sec.fish
@@ -1,2 +1,9 @@
-alias sec='ssh achessh@ache.one -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