From d25b147a56345e9fa015410375e1046d26ad74c7 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Tue, 25 Aug 2026 16:42:39 -0400 Subject: [PATCH] A CLI tool has runtime modes, not a request --- Plugin/unraid/Tools/fallback_folder.php | 15 ++++++++++++++- Plugin/unraid/Tools/mesh_traffic_sample.php | 11 +++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Plugin/unraid/Tools/fallback_folder.php b/Plugin/unraid/Tools/fallback_folder.php index fee9822..4f2d72e 100755 --- a/Plugin/unraid/Tools/fallback_folder.php +++ b/Plugin/unraid/Tools/fallback_folder.php @@ -9,6 +9,19 @@ // Onboard calls this on the mirror after deploying the owner's stack, so those containers land // somewhere that says whose they are instead of scattering into the mirror's own groups. // +// OPERATIONAL MODEL +// Create-or-update, never replace. The named folder is found in folder.view3 if it exists and +// is amended in place; only its absence causes one to be created. Every other folder in the +// file, and every container already filed elsewhere, is left exactly as it was — this is one +// shelf in someone else's cupboard. +// +// Called during onboard on the mirror, after the owner's stack has been deployed there, so the +// containers exist by the time anything tries to file them. +// +// The icon is resolved separately from the folder and never gates it. --icon-only performs +// just that lookup and prints the URL, which is how onboard asks for it without writing +// anything. +// // DESIGN PRINCIPLES // The name comes from master.conf, never from a second source. // HOST2="unRAID-Jayred36" → "Jayred36-Fallback". The convention already existed by hand as @@ -39,7 +52,7 @@ // --dry-run prints the resulting folder and writes nothing. // Icon resolution failing never blocks the folder: no image is a cosmetic loss, no folder is not. // -// REQUEST +// RUNTIME MODES // fallback_folder.php --host=HOST2 [--containers=A,B,C] [--icon=URL] [--dry-run] // fallback_folder.php --host=HOST2 --icon-only resolve and print the icon URL, write nothing // diff --git a/Plugin/unraid/Tools/mesh_traffic_sample.php b/Plugin/unraid/Tools/mesh_traffic_sample.php index cb3853e..78856a6 100644 --- a/Plugin/unraid/Tools/mesh_traffic_sample.php +++ b/Plugin/unraid/Tools/mesh_traffic_sample.php @@ -44,6 +44,17 @@ // php mesh_traffic_sample.php append one sample per mesh peer // php mesh_traffic_sample.php --show print what it would record, write nothing // +// CONFIGURATION +// master.conf +// HOST1, HOST2, … the hostname of each node in the mesh. Every HOST with a non-empty +// value becomes a name matched against tailscale's peer list; a peer that +// is not one of them is skipped, so a device that merely shares the +// tailnet is never recorded as mesh traffic. No HOST set at all means +// there is no mesh to sample and the run exits without writing. +// +// Nothing is read from host*.conf. This samples the local tailscale daemon, so it needs to +// know which peers count and nothing about how to reach them. +// // DEPENDS ON // tailscale status --json the counters // include/config.php DATA_DIR, vv_conf_vars() for the HOST* list