0f3973023a
Replaces the Go pia-wg-config (Go 1.23 rejects PIA legacy-CN no-SAN certs) with PIA's official CA-pinned curl flow. Adds CA-aware region auto-pick so ExpressVPN-CA migrated regions (e.g. us_chicago) auto-skip; region moved to us_denver. Tunnel restored + egress verified 2026-06-30. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
14 lines
739 B
Bash
Executable File
14 lines
739 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# Self-heal recovery for a stale/dead PIA WireGuard tunnel — the one-line action to run
|
|
# when the VpnTunnelDown alert fires. Registers a fresh peer, then recreates gluetun so
|
|
# it loads the new wg0.conf, and reconnects SAB/Transmission through the restored netns.
|
|
cd "$(dirname "$0")/.." # -> ~/downloads
|
|
echo "[regen-and-up] 1/3 registering a fresh PIA WG peer..."
|
|
docker compose run --rm pia-wg-regen
|
|
echo "[regen-and-up] 2/3 recreating gluetun with the new wg0.conf..."
|
|
docker compose up -d --force-recreate --no-deps gluetun
|
|
echo "[regen-and-up] 3/3 reconnecting dependents through the restored netns..."
|
|
docker compose up -d --force-recreate sabnzbd transmission
|
|
echo "[regen-and-up] done."
|