hosts/scripts/main_part.include: fix error at killing pid.

This commit is contained in:
2026-03-02 09:11:32 +01:00
parent fe73b6728b
commit 5df87179c8

View File

@@ -487,7 +487,8 @@ fi
if $_via_ssh_tunnel ; then if $_via_ssh_tunnel ; then
if [[ -n "$tunnel_pid" ]]; 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" kill "$tunnel_pid"
fi fi
fi fi