bootstrap.sh: symlink homelab CLI instead of copy

The 5-min sync pulls /opt/homelab-context but does not re-install the
CLI. A copy at /usr/local/bin/homelab therefore goes stale after every
CLI fix until someone re-runs bootstrap. Symlinking points
/usr/local/bin/homelab directly at the synced source, so updates land
on the next pull. Doc updated with the one-line migration for hosts
bootstrapped before this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-20 17:54:24 +02:00
parent df6aca888c
commit ae7eb8c649
2 changed files with 5 additions and 2 deletions

View File

@@ -241,8 +241,9 @@ echo "[bootstrap] installing sync mechanism for $OS"
run "bash '$CLONE_DIR/scripts/sync/install.sh'"
# -------- install homelab CLI --------
echo "[bootstrap] installing homelab CLI to /usr/local/bin/homelab"
run "install -m 0755 '$CLONE_DIR/bin/homelab' /usr/local/bin/homelab"
# Symlink rather than copy so the 5-min sync auto-updates the CLI.
echo "[bootstrap] linking homelab CLI to /usr/local/bin/homelab"
run "ln -sfn '$CLONE_DIR/bin/homelab' /usr/local/bin/homelab"
# -------- AGENTS.md symlink --------
case "$OS" in