[script]use autossh for setBridge
This commit is contained in:
parent
c5f309484d
commit
e0fa7c97ce
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
user=pi
|
user=pi
|
||||||
host=tutabaga.hd.free.fr
|
host=tutabaga.hd.free.fr
|
||||||
ps aux | grep ssh | grep $host > /dev/null
|
ps aux | grep autossh | grep $host > /dev/null
|
||||||
res=$?
|
res=$?
|
||||||
if [ $res == 1 ]; then
|
if [ $res == 1 ]; then
|
||||||
ssh -N -R 65022:localhost:22 $user@$host&
|
autossh -M 2222 -f -N -R 65022:localhost:22 $user@$host
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user