diff --git a/hosts/scripts/main_part.include b/hosts/scripts/main_part.include index 2791bc1..f1feba8 100644 --- a/hosts/scripts/main_part.include +++ b/hosts/scripts/main_part.include @@ -487,7 +487,8 @@ fi if $_via_ssh_tunnel ; then if [[ -n "$tunnel_pid" ]]; then - if ps --pd ${tunnel_pid} > /dev/null 2>&^; then + if ps --pd ${tunnel_pid} > /dev/null 2>&1; then + echo "target Host: $target_host - Kill tunnel PID $tunnel_pid" kill "$tunnel_pid" fi fi