ux update and code cleanup

This commit is contained in:
2026-04-06 23:19:04 +00:00
parent 8e4c588079
commit a5160c1af5
5 changed files with 205 additions and 66 deletions
+17 -17
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# ----------------------------------------------------------------------------------------------
# -------------------------------- Rsync Core Script (v1.5) ------------------------------------
# --------------------------------- Rsync Core Script ------------------------------------------
# ----------------------------------------------------------------------------------------------
# ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
# ----------------------------------------------------------------------------------------------
@@ -29,19 +29,19 @@ parse_args "${RAW_ARGS[@]}"
[[ -z "$DIRECTORY" ]] && error "No directory specified. Usage: rsync.sh <dir> [--dry-run] [--log]" && exit 1
# -----------------------------------------------------------------------------------------------
# --- $ICON_GEAR Setup ---
# ━━━ $ICON_GEAR Setup ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "--- $ICON_GEAR Setup ---"
echo "━━━ $ICON_GEAR Setup ━━━"
detect_hosts
resolve_remote_ip
# -----------------------------------------------------------------------------------------------
# --- $ICON_SHIELD Pre-flight Checks ---
# ━━━ $ICON_SHIELD Pre-flight Checks ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "--- $ICON_SHIELD Pre-flight Checks ---"
echo "━━━ $ICON_SHIELD Pre-flight Checks ━━━"
check_connectivity
check_remote_rootfs
@@ -70,20 +70,20 @@ read -r -a EXCLUDE_DIRS <<< "${PROFILE_EXCLUDE_DIRS[$PROFILE_NAME]:-
[[ "$SHOW_STATUS" == true ]] && show_status && exit 0
# -----------------------------------------------------------------------------------------------
# --- $ICON_STOP Containers ---
# ━━━ $ICON_STOP $ICON_CONTAINERS Containers ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "--- $ICON_STOP Containers ---"
echo "━━━ $ICON_STOP $ICON_CONTAINERS Containers ━━━"
stop_containers
# -----------------------------------------------------------------------------------------------
# --- $ICON_SYNC Transfer ---
# ━━━ $ICON_SYNC Transfer ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "--- $ICON_SYNC Transfer ---"
echo "$ICON_RUN Source: $DIRECTORY"
echo "$ICON_NET Remote: $REMOTE_SERVER:$DIRECTORY"
echo "━━━ $ICON_SYNC Transfer ━━━"
echo "$ICON_RUN Source: $DIRECTORY"
echo "$ICON_NET Remote: $REMOTE_SERVER:$DIRECTORY"
echo "$ICON_GEAR Profile: $PROFILE_NAME"
echo ""
@@ -117,29 +117,29 @@ for i in $(seq 1 "$RETRY_COUNT"); do
done
# -----------------------------------------------------------------------------------------------
# --- $ICON_START Containers ---
# ━━━ $ICON_START $ICON_CONTAINERS Containers ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "--- $ICON_START Containers ---"
echo "━━━ $ICON_START $ICON_CONTAINERS Containers ━━━"
start_containers
END=$(date +%s)
# -----------------------------------------------------------------------------------------------
# --- $ICON_SUMMARY Summary ---
# ━━━ $ICON_SUMMARY Summary ━━━
# -----------------------------------------------------------------------------------------------
echo ""
echo "===== $ICON_SUMMARY SUMMARY ====="
echo "━━━━━ $ICON_SUMMARY SUMMARY ━━━━━"
echo "$ICON_RUN Directory: $DIRECTORY"
echo "$ICON_GEAR Profile: $PROFILE_NAME"
echo "$ICON_TIME Duration: $(format_duration $((END - START)))"
if [[ "$RSYNC_SUCCESS" == true ]]; then
echo "$ICON_DONE Status: $ICON_SUCCESS DONE"
else
echo "$ICON_ERROR Status: $ICON_ERROR FAILED after $RETRY_COUNT attempts"
echo "$ICON_ERROR Status: $ICON_ERROR FAILED after $RETRY_COUNT attempts"
fi
echo "========================="
echo "━━━━━━━━━━━━━━━━━━━━━━━"
[[ "$RSYNC_SUCCESS" == false ]] && exit 1
exit 0