#!/usr/bin/env bash
set -euo pipefail
CONFIG="C:/Users/MF Sangadji/bestweb/scripts/bestweb_tunnel_config_v2.conf"
HOST="bestweb-bastion-v2"

if [ ! -f "$CONFIG" ]; then
  echo "Missing SSH config at $CONFIG" >&2
  exit 1
fi

ssh -F "$CONFIG" "$HOST" -N &
PID=$!
echo "$PID" > /tmp/bestweb_tunnel_v2.pid

echo "BestWeb tunnel v2 started (PID $PID). Forwarding local 9100 -> remote 9100 on 10.0.0.25."
