config/scripts/setBrigde.sh

9 lines
182 B
Bash
Raw Permalink Normal View History

2013-02-22 18:17:18 +01:00
#!/bin/bash
user=pi
host=tutabaga.hd.free.fr
2014-10-29 17:40:28 +01:00
ps aux | grep autossh | grep $host > /dev/null
2013-02-22 18:17:18 +01:00
res=$?
if [ $res == 1 ]; then
2014-10-29 17:40:28 +01:00
autossh -M 2222 -f -N -R 65022:localhost:22 $user@$host
2013-02-22 18:17:18 +01:00
fi