fix: add build-time binary search + runtime path-finder for purevpn-cli
This commit is contained in:
@@ -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 \
|
RUN curl -fsSL https://apps.purevpn-tools.com/cross-platform/linux-cli/production/cli-install.sh \
|
||||||
-o /tmp/cli-install.sh \
|
-o /tmp/cli-install.sh \
|
||||||
&& bash /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) ────────────────────────────
|
# ── 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/
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/etc/pure-linux-cli/
|
||||||
|
|||||||
@@ -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/
|
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}"
|
SOCKS5_PORT="${SOCKS5_INNER_PORT:-1080}"
|
||||||
VPN_IF="tun0"
|
VPN_IF="tun0"
|
||||||
VPN_WAIT=60 # max seconds to wait for tun0 to appear
|
VPN_WAIT=60 # max seconds to wait for tun0 to appear
|
||||||
|
|||||||
Reference in New Issue
Block a user