fix: fake systemctl for pured.service + pre-install service file
purevpn-cli checks `systemctl is-active pured.service` to determine if components are installed. Without systemd this always returns inactive, triggering endless sudo/reinstall loop and ETXTBSY when trying to overwrite the running daemon binary. Fake systemctl returns "active" when pured is listening on :9485, "inactive" otherwise. Also handles start/stop/disable/daemon-reload as no-ops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,15 @@ RUN curl -fsSL "https://apps.purevpn-tools.com/cross-platform/linux-daemon/1.4.1
|
||||
&& gzip -d /opt/purevpn-cli/pured-linux-x64.gz \
|
||||
&& chmod +x /opt/purevpn-cli/pured-linux-x64
|
||||
|
||||
# ── Fake systemctl (pured.service) ───────────────────────────────────────────
|
||||
# purevpn-cli checks `systemctl is-active pured.service` to detect missing
|
||||
# components. Without systemd, this always returns inactive → endless sudo loop.
|
||||
# Fake systemctl returns "active" when the daemon is reachable on :9485.
|
||||
COPY systemctl.sh /usr/local/bin/systemctl
|
||||
RUN chmod +x /usr/local/bin/systemctl \
|
||||
&& mkdir -p /etc/systemd/system \
|
||||
&& cp /opt/purevpn-cli/pured.service /etc/systemd/system/pured.service
|
||||
|
||||
# ── PATH ──────────────────────────────────────────────────────────────────────
|
||||
ENV PATH=/opt/purevpn-cli/bin:/opt/purevpn-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user