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

@ -220,7 +220,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 -- /usr/local/bin/$NAME-update"
echo " deploy a new commit: pct exec $CTID -- $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"
@ -512,7 +512,7 @@ finish_message() {
# 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"
remove="sudo systemctl disable --now $NAME && sudo rm -rf $INSTALL_DIR /etc/systemd/system/$NAME.service /usr/local/bin/$NAME-update /usr/bin/$NAME-update"
else
deploy="$NAME-update"; logs="tail -f $INSTALL_DIR/data/service.log"
remove="sudo launchctl bootout system/dev.neilbantoc.$NAME; sudo rm -rf $INSTALL_DIR /Library/LaunchDaemons/dev.neilbantoc.$NAME.plist /usr/local/bin/$NAME-update"