#!/usr/bin/env bash set -euo pipefail # Register a FRESH PIA WireGuard peer and rewrite ./pia-wg/config/wg0.conf by running # the pinned pia-wg-regen oneshot container. Safe to re-run (always a brand-new peer). # Note: this only regenerates the config; gluetun must be (re)started to load it # (use regen-and-up.sh for the full recovery, or `docker compose up -d`). cd "$(dirname "$0")/.." # -> ~/downloads (compose project dir) exec docker compose run --rm pia-wg-regen