From 16571134b5384a3efe943877454a38b99faf7714 Mon Sep 17 00:00:00 2001 From: librelad Date: Mon, 25 May 2026 17:18:46 +0100 Subject: [PATCH] refactor(paths): scrub residual /docker references in display text + comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit follow-up — after a full-repo sweep, the only remaining functional /docker refs are intentional (the legacy compat shim + the env-overridden legacy-safe backend default). Fix the last user-visible/stale ones: - config-options.js: backup PATH_MODE 'auto' label no longer hardcodes /docker/backups (the path is relocatable) — describes the behaviour instead. - config.js / setup-detector.js / webui_install_image.sh: refresh comments that named /docker to the relocatable system/containers roots. No behaviour change. Active container app scripts already use $containers_dir; the remaining /docker hits across the tree are docker-compose.yml filenames, /var/lib/docker, the docker binary, relative array paths, docs/site, and the unused/ graveyard. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- containers/libreportal/backend/utils/config.js | 2 +- .../frontend/js/components/config/config-options.js | 2 +- .../libreportal/frontend/js/system/setup-detector.js | 2 +- scripts/webui/webui_install_image.sh | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/containers/libreportal/backend/utils/config.js b/containers/libreportal/backend/utils/config.js index 43a6f24..6a65cfb 100755 --- a/containers/libreportal/backend/utils/config.js +++ b/containers/libreportal/backend/utils/config.js @@ -42,7 +42,7 @@ const webuiLoginsConfig = parseConfigFile(path.join(__dirname, '..', '..', 'webu const webuiLogsConfig = parseConfigFile(path.join(__dirname, '..', '..', 'webui_logs')); // Merge: later sources override earlier. webui_logins / webui_logs hold -// CFG_WEBUI_* keys generated from /docker/configs/webui/* and bind-mounted +// CFG_WEBUI_* keys generated from the system configs/webui/* and bind-mounted // in via libreportal's compose. const fileConfig = { ...libreportalConfig, ...webuiLoginsConfig, ...webuiLogsConfig }; diff --git a/containers/libreportal/frontend/js/components/config/config-options.js b/containers/libreportal/frontend/js/components/config/config-options.js index 30111d5..957a359 100755 --- a/containers/libreportal/frontend/js/components/config/config-options.js +++ b/containers/libreportal/frontend/js/components/config/config-options.js @@ -257,7 +257,7 @@ class ConfigOptions { { value: 'rclone', label: 'rclone' } ], PATH_MODE: [ - { value: 'auto', label: 'Automatic (/docker/backups/)' }, + { value: 'auto', label: 'Automatic (backups root, one subfolder per location)' }, { value: 'custom', label: 'Custom path' } ], ENGINE: [ diff --git a/containers/libreportal/frontend/js/system/setup-detector.js b/containers/libreportal/frontend/js/system/setup-detector.js index 73274c5..26975ad 100755 --- a/containers/libreportal/frontend/js/system/setup-detector.js +++ b/containers/libreportal/frontend/js/system/setup-detector.js @@ -60,7 +60,7 @@ class SetupDetector { } // Detect if this is first-time setup. Source of truth is the server-side - // lock file at /docker/containers/libreportal/frontend/data/.setup_complete + // lock file at /libreportal/frontend/data/.setup_complete // — that's what the bash setupApply function creates after a successful // wizard run. localStorage is no longer used because per-browser state // gives wrong answers (different browsers would each see "first install"). diff --git a/scripts/webui/webui_install_image.sh b/scripts/webui/webui_install_image.sh index e7012e4..f4c23f1 100755 --- a/scripts/webui/webui_install_image.sh +++ b/scripts/webui/webui_install_image.sh @@ -6,11 +6,11 @@ installLibrePortalImageWebUI() isNotice "Building the LibrePortal WebUI Docker image..." - # The copy below writes into the dockerinstall-owned containers/ dir. On a + # The copy below writes into the dockerinstall-owned containers root. On a # fresh install the general traversal/ownership reconcile runs LATER, so at - # this point /docker is still 750 (untraversable by the container user) and - # containers/ may still be manager-owned — the copy would fail. Establish - # traversal (+x on /docker) and containers/ ownership FIRST. + # this point the system root is still 750 (untraversable by the container user) + # and the containers root may still be manager-owned — the copy would fail. + # Establish traversal + containers-root ownership FIRST. fixFolderPermissions local result=$(copyFolder "$install_containers_dir/libreportal" "$containers_dir" "$sudo_user_name")