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

@ -225,7 +225,7 @@ lxc_install() {
echo " open the web UI: http://$host.local$suffix (or http://${ip:-<container-ip>}$suffix)"
fi
echo " give it a fixed IP: a DHCP reservation, or pct set $CTID --net0 name=eth0,bridge=...,ip=<ip>/<cidr>,gw=<gw>"
echo " deploy a new commit: pct exec $CTID -- $NAME-update"
echo " deploy a new commit: pct exec $CTID -- /usr/local/bin/$NAME-update"
echo " logs: pct exec $CTID -- journalctl -u $NAME -f"
echo " settings: pct exec $CTID -- nano /opt/$NAME/.env (then: pct exec $CTID -- systemctl restart $NAME)"
echo " shell inside: pct enter $CTID"
@ -514,7 +514,9 @@ finish_message() {
deploy="docker exec $NAME update"; logs="docker logs -f $NAME"
remove="cd $INSTALL_DIR && docker compose -f $COMPOSE_FILE down -v"
elif [ "$OS" = Linux ]; then
deploy="sudo $NAME-update"; logs="journalctl -u $NAME -f"
# Root (e.g. inside an LXC, which usually has no sudo) runs it directly.
deploy="$NAME-update"; [ "$(id -u)" = 0 ] || deploy="sudo $deploy"
logs="journalctl -u $NAME -f"
remove="sudo systemctl disable --now $NAME && sudo rm -rf $INSTALL_DIR /etc/systemd/system/$NAME.service /usr/local/bin/$NAME-update"
else
deploy="$NAME-update"; logs="tail -f $INSTALL_DIR/data/service.log"