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:
parent
be727949c1
commit
c9738358de
8 changed files with 19 additions and 11 deletions
|
|
@ -26,6 +26,9 @@ while [ $# -gt 0 ]; do
|
|||
done
|
||||
|
||||
if [ "$PLATFORM" = systemd ] && [ "$(id -u)" != 0 ]; then native_die "run it with sudo: sudo $NAME-update $*"; fi
|
||||
if [ "$PLATFORM" = systemd ] && [ ! -e "/usr/bin/$NAME-update" ]; then # installs older than the /usr/bin link
|
||||
ln -sfn "/usr/local/bin/$NAME-update" "/usr/bin/$NAME-update" 2>/dev/null || true
|
||||
fi
|
||||
if [ "$PLATFORM" = launchd ] && [ "$(id -u)" = 0 ] && [ "$SVC_USER" != root ]; then
|
||||
exec sudo -u "$SVC_USER" NETMON_DIR="$INSTALL_DIR" /bin/bash "$0" "$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue