test
This commit is contained in:
+6
-11
@@ -10,28 +10,23 @@ source "$SCRIPT_DIR/../common.sh"
|
||||
# Load config
|
||||
load_master_conf
|
||||
|
||||
# Parse arguments, etc...
|
||||
# Detect hosts and SSH key
|
||||
detect_hosts
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# --------------------------- Input Arguments --------------------------------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# Input arguments
|
||||
DIRECTORY="$1"
|
||||
if [[ -z "$DIRECTORY" ]]; then
|
||||
echo "Usage: $0 <directory-to-sync> [--dry-run|-n] [VAR=value ...]"
|
||||
exit 1
|
||||
fi
|
||||
shift # remove DIRECTORY
|
||||
|
||||
# Parse CLI args
|
||||
shift
|
||||
parse_args "$@"
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# --------------------------- Profile Detection -------------------------------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# Determine profile
|
||||
PROFILE_NAME=$(basename "$DIRECTORY" | tr '[:upper:]' '[:lower:]')
|
||||
echo "Detected profile: $PROFILE_NAME"
|
||||
|
||||
# Apply profile defaults or fallback to global defaults
|
||||
# Apply profile settings
|
||||
MAX_RSYNC_PROCS=${PROFILE_MAX_PROCS[$PROFILE_NAME]:-$MAX_RSYNC_PROCS}
|
||||
BW_LIMIT=${PROFILE_BW_LIMIT[$PROFILE_NAME]:-$BW_LIMIT}
|
||||
CRITICAL_CONTAINER_NAMES=(${PROFILE_CRITICAL_CONTAINER_NAMES[$PROFILE_NAME]})
|
||||
|
||||
Reference in New Issue
Block a user