fix
This commit is contained in:
+5
-17
@@ -20,23 +20,11 @@ set -euo pipefail
|
|||||||
|
|
||||||
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
# Self-healing config loader (OPTION C)
|
|
||||||
# -----------------------------------------------------------------------------
|
# Load configs & helpers
|
||||||
if [[ -f "$BASE_DIR/../common.sh" ]]; then
|
source "$SCRIPT_DIR/../Master.conf"
|
||||||
# normal layout: Rsync/ + shared root files
|
source "$SCRIPT_DIR/../common.sh"
|
||||||
source "$BASE_DIR/../Master.conf"
|
|
||||||
source "$BASE_DIR/../common.sh"
|
|
||||||
elif [[ -f "$BASE_DIR/common.sh" ]]; then
|
|
||||||
# flat layout: everything inside Rsync/
|
|
||||||
source "$BASE_DIR/Master.conf"
|
|
||||||
source "$BASE_DIR/common.sh"
|
|
||||||
else
|
|
||||||
echo "ℹ️ [INFO] Host: $(hostname)"
|
|
||||||
echo "❌ [ERROR] common.sh and Master.conf not found in expected locations"
|
|
||||||
echo "ℹ️ [INFO] BASE_DIR = $BASE_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Load shared helpers (if your common.sh provides these)
|
# Load shared helpers (if your common.sh provides these)
|
||||||
|
|||||||
Reference in New Issue
Block a user