From 670f25fbbd9b153e6db4af1e2c12afbf4dc528b4 Mon Sep 17 00:00:00 2001 From: Gmer4Lfe Date: Fri, 22 May 2026 19:18:18 -0400 Subject: [PATCH] Move .conf files into Configurations/ folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit master.conf, host1.conf, host2.conf relocated from repo root to Configurations/. load_config.sh updated to source from the new path — no other scripts need changes. Note: sparse checkout rules on HOST1 and HOST2 need updating to use Configurations/host1.conf and Configurations/host2.conf respectively. --- host1.conf => Configurations/host1.conf | 0 host2.conf => Configurations/host2.conf | 0 master.conf => Configurations/master.conf | 0 load_config.sh | 16 ++++++++-------- 4 files changed, 8 insertions(+), 8 deletions(-) rename host1.conf => Configurations/host1.conf (100%) rename host2.conf => Configurations/host2.conf (100%) rename master.conf => Configurations/master.conf (100%) diff --git a/host1.conf b/Configurations/host1.conf similarity index 100% rename from host1.conf rename to Configurations/host1.conf diff --git a/host2.conf b/Configurations/host2.conf similarity index 100% rename from host2.conf rename to Configurations/host2.conf diff --git a/master.conf b/Configurations/master.conf similarity index 100% rename from master.conf rename to Configurations/master.conf diff --git a/load_config.sh b/load_config.sh index cfa2191..45a28a5 100644 --- a/load_config.sh +++ b/load_config.sh @@ -23,7 +23,7 @@ # auto-discovers it on next git pull. Zero script changes required. Ever. # # ── ADDING A NEW SERVER ─────────────────────────────────────────────────────────────────────── -# 1. Create host3.conf following the same structure as HOST1/HOST2 +# 1. Create Configurations/host3.conf following the same structure as HOST1/HOST2 # 2. Commit and push to git repo # 3. All servers pull it automatically — no other changes needed # @@ -41,10 +41,10 @@ # # ── SPARSE CHECKOUT NOTE ────────────────────────────────────────────────────────────────────── # Sparse checkout controls which host*.conf files each server receives. -# HOST1 only pulls host1.conf — never HOST2's credentials. -# HOST2 only pulls host2.conf — never HOST1's credentials. +# HOST1 only pulls Configurations/host1.conf — never HOST2's credentials. +# HOST2 only pulls Configurations/host2.conf — never HOST1's credentials. # This loader sources whatever conf files ARE present — sparse checkout handles the rest. -# Both servers pull all non-credential conf files (master.conf, common.sh, load_config.sh). +# Both servers pull all non-credential conf files (Configurations/master.conf, common.sh, load_config.sh). # # ============================================================================================== @@ -56,12 +56,12 @@ # ━━━ Source shared config ━━━ # master.conf must be sourced first — it declares the shared PROFILE_* arrays # that Host confs extend. Sourcing host confs before master.conf would fail. - if [[ ! -f "$LOAD_CONFIG_DIR/master.conf" ]]; then - echo "[FATAL] master.conf not found at $LOAD_CONFIG_DIR/master.conf" >&2 + if [[ ! -f "$LOAD_CONFIG_DIR/Configurations/master.conf" ]]; then + echo "[FATAL] master.conf not found at $LOAD_CONFIG_DIR/Configurations/master.conf" >&2 echo "[FATAL] Check TARGET_DIR and git pull status" >&2 exit 1 fi - source "$LOAD_CONFIG_DIR/master.conf" + source "$LOAD_CONFIG_DIR/Configurations/master.conf" # ━━━ Auto-discover and source all host*.conf files ━━━ # Sorted for consistent load order — HOST1 before HOST2 before HOST3 etc. @@ -70,7 +70,7 @@ # At least one host conf must be present or the ecosystem has no identity to work with. _host_confs_loaded=0 - for _conf in $(ls "$LOAD_CONFIG_DIR"/host*.conf 2>/dev/null | sort); do + for _conf in $(ls "$LOAD_CONFIG_DIR/Configurations"/host*.conf 2>/dev/null | sort); do if [[ -f "$_conf" ]]; then source "$_conf" (( _host_confs_loaded++ ))