Files

11 lines
430 B
Bash
Executable File

#!/bin/bash
# worker-start.sh — 启动"浏览器工人"(WSL端)
# 启动自愈守护: 它会自动拉起Chrome(带智联登录态)并建立到服务器的反向隧道
DIR="$(cd "$(dirname "$0")" && pwd)"
if pgrep -f "cdp-tunnel.sh" >/dev/null; then
echo "✅ 守护已在运行,无需重复启动"
else
nohup "$DIR/cdp-tunnel.sh" >/tmp/cdp-tunnel.log 2>&1 &
echo "✅ 守护已启动(约10秒内拉起Chrome和隧道)"
fi