diff --git a/vpn-node/Dockerfile b/vpn-node/Dockerfile index 2709b18..e4f17ee 100644 --- a/vpn-node/Dockerfile +++ b/vpn-node/Dockerfile @@ -16,7 +16,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN curl -fsSL https://apps.purevpn-tools.com/cross-platform/linux-cli/production/cli-install.sh \ -o /tmp/cli-install.sh \ && bash /tmp/cli-install.sh \ - && rm -f /tmp/cli-install.sh + && rm -f /tmp/cli-install.sh \ + && echo ">>> purevpn-cli install search:" \ + && find / -maxdepth 8 -name "purevpn*" 2>/dev/null || true \ + && echo ">>> /etc/pure-linux-cli contents:" \ + && ls -la /etc/pure-linux-cli/ 2>/dev/null || echo "(directory not found)" # ── Add purevpn-cli to PATH (as per official docs) ──────────────────────────── ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/etc/pure-linux-cli/ diff --git a/vpn-node/entrypoint.sh b/vpn-node/entrypoint.sh index 5db3d6d..6690806 100755 --- a/vpn-node/entrypoint.sh +++ b/vpn-node/entrypoint.sh @@ -6,6 +6,21 @@ set -euo pipefail export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/etc/pure-linux-cli/ +# ── Locate purevpn-cli wherever the installer put it ───────────────────────── +if ! command -v purevpn-cli &>/dev/null; then + _bin=$(find / -maxdepth 8 -name "purevpn-cli" -type f 2>/dev/null | head -1) + if [[ -n "$_bin" ]]; then + export PATH="$(dirname "$_bin"):$PATH" + echo "[entrypoint] purevpn-cli found at $_bin — PATH updated" + else + echo "[entrypoint] FATAL: purevpn-cli not found anywhere on the filesystem" + echo "[entrypoint] All purevpn* files:" + find / -maxdepth 8 -name "purevpn*" 2>/dev/null || true + exit 1 + fi +fi +echo "[entrypoint] Using purevpn-cli: $(command -v purevpn-cli)" + SOCKS5_PORT="${SOCKS5_INNER_PORT:-1080}" VPN_IF="tun0" VPN_WAIT=60 # max seconds to wait for tun0 to appear