Files
docs-alpha.jayfield.org/scripts
jensandClaude Sonnet 5 5b286644db Unmount WSD2L840 after sync, but only if this run mounted it
Previously the pull script mounted the Unassigned Device and left it
mounted indefinitely. Now tracks whether it was already mounted before
this run and only unmounts at the end if it wasn't - never disturbs a
mount already in place for some other reason. Handled via an EXIT trap
so it fires on any exit path, not just success.

Found and fixed a real bug testing this: the script cd's into the
mounted directory and never leaves, so the unmount was failing with
"target is busy" (the shell's own cwd still being on the device) until
the cleanup function explicitly cd's out first. Verified both
directions live: already-mounted stays mounted after; not-mounted gets
mounted, used, and cleanly unmounted again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 17:33:58 +02:00
..

Scripts and configs — checked-in reference copies

This directory holds the actual scripts and config files running on alpha.jayfield.org and its backup client(s), checked into git so they're versioned and reviewable alongside the prose docs that explain why they exist (README.md, TODO.md, SYNC-PLAN.md in the repo root).

These are reference copies, not a deployment source. Editing a file here does not change anything on the live server — there is no CI/CD or sync mechanism pulling from this repo onto either host (matching this whole repo's existing convention: "changes are made directly on the server and recorded here afterward", see the root README.md). After changing something on a live host, re-fetch it into this directory so the checked-in copy doesn't drift from reality.

Layout

  • alpha/ — scripts and configs that run on alpha.jayfield.org itself (Ubuntu 24.04 LTS — see alpha/README.md for the exact version/kernel).
  • clients/ — scripts and configs that run on other hosts this project administers, each in its own subdirectory named after the host. Currently just clients/vlda-01/ (Unraid — see its own README.md), but structured to hold more if that ever grows (see SYNC-PLAN.md for what else lives on vlda-01).

Why this split matters: alpha and its clients run different, often very different, operating systems (Ubuntu vs. Unraid so far) — a script written for one's conventions (systemd, /etc/cron.d, standard persistent filesystem) will not just drop into the other unchanged (Unraid's / and /usr are RAM-backed and don't survive a reboot, its own scheduling is via the User Scripts plugin, not raw crontab — see clients/vlda-01/README.md for the specifics that tripped this up while building it). Each subdirectory's README.md states the exact OS/version a script was written for, so anyone reusing these later — including future-me — knows whether a given script's assumptions still hold.