diff --git a/sysconfig/etc_rc.local b/sysconfig/etc_rc.local index 42df5f6..ae3e018 100755 --- a/sysconfig/etc_rc.local +++ b/sysconfig/etc_rc.local @@ -19,28 +19,28 @@ fi sudo -u automation /home/automation/chch-power/run.sh -{ +( + set +e # disable bash errexit sleep 60 - while /bin/true; - do + while true; do # cat ~/.ssh/authorized_key # restrict,command="",port-forwarding ssh-rsa AAAA... - autossh ssh-port-forwarding@vbox.chch.it -M 0 -o "TCPKeepAlive yes" -o "ServerAliveInterval 5" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -N -4 -R '127.0.0.1:2322:127.0.0.1:22' + ssh ssh-port-forwarding@vbox.chch.it -TNnqakx -o "TCPKeepAlive yes" -o "ServerAliveInterval 5" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -N -4 -R '127.0.0.1:2322:127.0.0.1:22' -L '127.0.0.1:2525:127.0.0.1:25' sleep 30 done -} & -disown $! +) & +disown -{ +( + set +e # disable bash errexit sleep 60 - while /bin/true; - do + while true; do # cat ~/.ssh/authorized_key # restrict,command="",port-forwarding ssh-rsa AAAA... - autossh ssh-port-forwarding@vcup.chch.it -M 0 -o "TCPKeepAlive yes" -o "ServerAliveInterval 5" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -N -4 -R '127.0.0.1:2322:127.0.0.1:22' + ssh ssh-port-forwarding@vcup.chch.it -TNnqakx -o "TCPKeepAlive yes" -o "ServerAliveInterval 5" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" -N -4 -R '127.0.0.1:2322:127.0.0.1:22' sleep 30 done -} & -disown $! +) & +disown exit 0