reconf the master and common scripts and all unraid essential scripts# Please enter the commit message for your changes. Lines starting
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# Stop all running Rsync processes for Unraid
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
# Load central config
|
||||
load_master_conf
|
||||
|
||||
# Parse CLI args (supports --dry-run)
|
||||
parse_args "$@"
|
||||
|
||||
# Functions
|
||||
|
||||
stop_rsync_processes() {
|
||||
if [ "$DRY_RUN" = true ]; then
|
||||
echo "[DRY-RUN] Would stop all running rsync processes"
|
||||
else
|
||||
echo "Stopping all rsync processes..."
|
||||
if pkill -f rsync; then
|
||||
echo "All rsync processes stopped successfully."
|
||||
else
|
||||
echo "No rsync processes found or failed to stop."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# MAIN
|
||||
echo "==== Rsync Stop Script Started: $(date) ===="
|
||||
|
||||
stop_rsync_processes
|
||||
Reference in New Issue
Block a user