big logic update to rsync and rsync called scripts
This commit is contained in:
+15
-9
@@ -80,9 +80,6 @@ read -r -a EXCLUDE_DIRS <<< "${PROFILE_EXCLUDE_DIRS[$PROFILE_N
|
||||
# Local and remote use the same container list — same naming scheme on both servers
|
||||
LOCAL_CRITICAL_CONTAINER_NAMES=("${CRITICAL_CONTAINER_NAMES[@]}")
|
||||
|
||||
# Disk check toggle
|
||||
SKIP_DISK_CHECK=${PROFILE_SKIP_DISK_CHECK[$PROFILE_NAME]:-false}
|
||||
|
||||
[[ "$SHOW_STATUS" == true ]] && show_status && exit 0
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -91,15 +88,24 @@ SKIP_DISK_CHECK=${PROFILE_SKIP_DISK_CHECK[$PROFILE_NAME]:-false}
|
||||
echo ""
|
||||
echo "━━━ $ICON_SHIELD Pre-flight Checks ━━━"
|
||||
|
||||
# Disk temp check — before touching remote or moving any data
|
||||
# Returns: 0=OK 1=warn(skip this profile) 2=crit(abort all remaining)
|
||||
check_local_disk_temps
|
||||
TEMP_RESULT=$?
|
||||
if [[ "$TEMP_RESULT" -eq 2 ]]; then
|
||||
error "Drive temps CRITICAL — aborting sync for all remaining profiles"
|
||||
exit 2 # caller (daily_sync_maintenance.sh) sees exit 2 → stops all syncs
|
||||
elif [[ "$TEMP_RESULT" -eq 1 ]]; then
|
||||
warn "Drive temps too high — skipping profile [$PROFILE_NAME]"
|
||||
exit 1 # caller sees exit 1 → skips this profile, continues to next
|
||||
else
|
||||
success "Drive temps OK — $TEMP_CHECK_RESULT"
|
||||
fi
|
||||
|
||||
check_connectivity
|
||||
check_remote_rootfs
|
||||
check_remote_share "$DIRECTORY"
|
||||
|
||||
if [[ "$SKIP_DISK_CHECK" == "true" ]]; then
|
||||
info "$ICON_DISK Disk check skipped for profile [$PROFILE_NAME] — ZFS pool on remote"
|
||||
else
|
||||
check_remote_disks "$DIRECTORY"
|
||||
fi
|
||||
check_remote_disks "$DIRECTORY"
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# ━━━ $ICON_STOP $ICON_CONTAINERS Containers ━━━
|
||||
|
||||
Reference in New Issue
Block a user