fix(onboard): 30-node-agent — mkdir -p deploy dir before rsync

rsync fails with "No such file or directory" when intermediate dirs
don't exist. /opt/homelab/deploy/ is not created by 20-base.sh.
Add rrun mkdir -p before rsync_dir; pi owns /opt/homelab so no sudo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Oskar Kapala 2026-06-09 14:46:01 +02:00
parent f6342749e6
commit a99bf9dadc

View file

@ -68,6 +68,10 @@ if [[ "$_running" -eq 0 ]]; then
[[ -f "$LOCAL_OVERRIDE" ]] \
|| die "Override not found: $LOCAL_OVERRIDE"
# Ensure remote deploy dir exists (rsync does not create intermediate dirs)
# pi owns /opt/homelab, so no sudo needed
rrun mkdir -p "${REMOTE_DEPLOY_DIR}"
# Push base compose + Dockerfile + src/ (rsync_dir handles DRY_RUN)
rsync_dir "${LOCAL_SVC_DIR}/" "${REMOTE_DEPLOY_DIR}/"