Link <name>-update into /usr/bin so pct exec finds it without the full path

pct exec runs without a login shell and its PATH may lack /usr/local/bin.
setup.sh adds the link on Linux; update.sh adds it to older installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-04 21:05:20 -08:00
parent be727949c1
commit c9738358de
8 changed files with 19 additions and 11 deletions

View file

@ -91,6 +91,11 @@ printf '#!/bin/sh\n# Deploy a new commit of %s (native install). See: %s-update
as_root mkdir -p /usr/local/bin
as_root install -m 755 "$tmp" "/usr/local/bin/$NAME-update"
rm -f "$tmp"
if [ "$PLATFORM" = systemd ]; then
# Also in /usr/bin, which is on every PATH: `pct exec <ctid> -- <name>-update` from a Proxmox
# node runs without a login shell and its PATH may not include /usr/local/bin.
as_root ln -sfn "/usr/local/bin/$NAME-update" "/usr/bin/$NAME-update"
fi
native_log "service"
if [ "$PLATFORM" = systemd ]; then