Use the full path for the update command under pct exec

pct exec runs commands with a minimal PATH that lacks /usr/local/bin, so
"pct exec <ctid> -- network-monitor-update" failed with "No such file".
The installer summary, README and CLAUDE.md now give
/usr/local/bin/<name>-update. The in-container summary and the Settings
page no longer suggest sudo where there is none (as root in an LXC).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-04 19:34:51 -08:00
parent cb092f2333
commit 35459b6309
6 changed files with 22 additions and 10 deletions

View file

@ -11,7 +11,13 @@ unset GIT_TOKEN GIT_USERNAME GIT_SSH_KEY
APP_VERSION=$(git -c safe.directory="$INSTALL_DIR" -C "$INSTALL_DIR" rev-parse --short HEAD 2>/dev/null || echo dev)
PORT=$(app_port)
export ROLE APP_VERSION PORT INSTALL_DIR INSTALL_MODE=native DATA_DIR="$INSTALL_DIR/data" PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
export UPDATE_COMMAND="sudo $NAME-update"
[ "$PLATFORM" = launchd ] && UPDATE_COMMAND="$NAME-update"
# How to deploy, as shown on the Settings page. sudo only where it exists (LXCs usually have
# none and you are root there); macOS runs it as the installing user.
UPDATE_COMMAND="$NAME-update"
if [ "$PLATFORM" = systemd ] && command -v sudo >/dev/null 2>&1; then UPDATE_COMMAND="sudo $NAME-update"; fi
if systemd-detect-virt -cq 2>/dev/null; then
UPDATE_COMMAND="$NAME-update (from the Proxmox node: pct exec <ctid> -- /usr/local/bin/$NAME-update)"
fi
export UPDATE_COMMAND
exec "$INSTALL_DIR/.venv/bin/uvicorn" app.main:app --host "$(app_host)" --port "$PORT" \
--no-server-header --timeout-graceful-shutdown 10