9 lines
182 B
Bash
Executable File
9 lines
182 B
Bash
Executable File
#!/bin/bash
|
|
user=pi
|
|
host=tutabaga.hd.free.fr
|
|
ps aux | grep autossh | grep $host > /dev/null
|
|
res=$?
|
|
if [ $res == 1 ]; then
|
|
autossh -M 2222 -f -N -R 65022:localhost:22 $user@$host
|
|
fi
|