Update start_systemd.sh

This commit is contained in:
12nick12 2018-06-05 16:48:51 -04:00 committed by GitHub
parent 2b3fa1173f
commit 899e534019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
remoteport=$(sqlite3 /opt/sshjump/sshjump.db 'select port from sshjump') dir=opt/sshjump
serverhost=user@test.test.com
serviceport=22333
remoteport=$(sqlite3 $dir/sshjump.db 'select port from sshjump')
localport=22 localport=22
until ping -c1 google.com &>/dev/null; do :; done until ping -c1 google.com &>/dev/null; do :; done
autossh -N -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport root@test.com -p 22333 -i /opt/sshjump/id_rsa autossh -N -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R $remoteport:localhost:$localport $server -p $serverport -i $dir/id_rsa