Pre-starting pured in the entrypoint caused ETXTBSY when the install subprocess (triggered by createRootProcessForMissingComponents) tried to overwrite the running daemon binary. - Remove pured pre-start from entrypoint; daemon starts via `systemctl start pured` inside the install subprocess instead - systemctl stop: use pkill -9 + sleep 1 for reliable termination - systemctl start: wait up to 15s for :9485 instead of blind sleep 2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
699 B
Bash
21 lines
699 B
Bash
#!/bin/bash
|
|
# Fake systemctl for containers — handles pured.service lifecycle without systemd.
|
|
# All other commands are no-ops so purevpn-cli installer steps don't break.
|
|
case "$*" in
|
|
*"is-active pured"*)
|
|
nc -z 127.0.0.1 9485 2>/dev/null && echo "active" && exit 0
|
|
echo "inactive"; exit 1 ;;
|
|
*"start pured"*)
|
|
NODE_ENV=production /opt/purevpn-cli/pured-linux-x64 --start &
|
|
for _i in $(seq 1 15); do
|
|
nc -z 127.0.0.1 9485 2>/dev/null && exit 0
|
|
sleep 1
|
|
done
|
|
exit 0 ;;
|
|
*"stop pured"*|*"disable pured"*)
|
|
pkill -9 -f "pured-linux-x64" 2>/dev/null || true
|
|
sleep 1; exit 0 ;;
|
|
*)
|
|
exit 0 ;;
|
|
esac
|