Structure change and vissually fixing code to make it easier to read

This commit is contained in:
2026-03-26 22:35:44 +00:00
parent 84cdc6169b
commit 4ef4c1428c
14 changed files with 253 additions and 141 deletions
+16 -11
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#----------------------------- Master Variables for unRAID scripts ----------------------------- # ---------------------------- Master Variables for unRAID scripts -----------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# This is the master.conf file, it contains all the variables used by # This is the master.conf file, it contains all the variables used by
# all scripts. # all scripts.
# #
@@ -11,11 +11,11 @@
# This is where you should adjust any settings or variables # This is where you should adjust any settings or variables
# that you want to apply globally across all your scripts # that you want to apply globally across all your scripts
# #
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust here in Master.conf as needed ----------------- # ---------------- User Variables, Please adjust here in Master.conf as needed -----------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#-------------------- Host Configuration -------------------- # ----------------------- Host Configuration --------------------
# List the Hostnames of both servers # List the Hostnames of both servers
HOST1="unRAID-Gmer4Lfe" HOST1="unRAID-Gmer4Lfe"
HOST2="unRAID-Jayred365" HOST2="unRAID-Jayred365"
@@ -24,11 +24,16 @@ HOST2="unRAID-Jayred365"
HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key" HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key"
HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key" HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key"
# -------------------------- Logging --------------------------- # -------------------------- Logging ----------------------------
ENABLE_LOGGING=true # false = only echo user-facing messages ENABLE_LOGGING=true # false = only echo user-facing messages
# ------------------ Git, Pull & Execute Script -----------------
REPO_SSH="git@192.168.50.2:FailedProxy/Unraid_Scripts.git"
TARGET_DIR="/mnt/user/appdata/unraid_scripts"
SSH_KEY="/root/.ssh/id_gitea_rsync"
SSH_PORT=221
#--------------------Rsync Script Defaults----------------------- # -------------------Rsync Script Defaults-----------------------
# Network speed limit (KB/s) # Network speed limit (KB/s)
BW_LIMIT=12500 BW_LIMIT=12500
# Retry logic # Retry logic
@@ -48,7 +53,7 @@ EXCLUDE_DIRS=("")
# Default global rsync options # Default global rsync options
DEFAULT_RSYNC_OPTS=(-av --info=progress2 --human-readable --bwlimit="$BW_LIMIT" --delete --inplace --no-whole-file) DEFAULT_RSYNC_OPTS=(-av --info=progress2 --human-readable --bwlimit="$BW_LIMIT" --delete --inplace --no-whole-file)
#-------------------- unRAID essentail scripts ------------------ # ------------------- unRAID essentail scripts ------------------
# unRAID reboot script user warning time (seconds) # unRAID reboot script user warning time (seconds)
REBOOT_SLEEP=300 REBOOT_SLEEP=300
# unRAID mover stop script timeout (seconds) # unRAID mover stop script timeout (seconds)
@@ -60,7 +65,7 @@ PHP_CONF="/etc/php-fpm.d/www.conf"
# php_fpm_max_children.sh max children value # php_fpm_max_children.sh max children value
PHP_MAX_CHILDREN=250 PHP_MAX_CHILDREN=250
#---------------------- Profile System ------------------------- # --------------------- Profile System -------------------------
# Profiles are inferred from the directory basename (lowercased) # Profiles are inferred from the directory basename (lowercased)
# Profile-specific rsync options (override global) must list all options as they do not inherit from global # Profile-specific rsync options (override global) must list all options as they do not inherit from global
# For example, look up at global rsync options above # For example, look up at global rsync options above
+5
View File
@@ -16,3 +16,8 @@ This opens the script and passes the folder overas an argument
This allows for multiple rsync ops running off a single core script This allows for multiple rsync ops running off a single core script
All changes made to 1 single core script then works for all user scripts that point to rsync.sh All changes made to 1 single core script then works for all user scripts that point to rsync.sh
The Master.conf file is where all user changeable variables live, This is for all scripts
A common.sh file also is used to share all common codes that multiple scripts use
This allows for easier managment of scripts, editing, and what not
+88 -26
View File
@@ -1,37 +1,99 @@
#!/bin/bash
set -e
# ----------------------------------------------------------------------------------------------
# --------------------------------- Git, Pull & Exectute Script --------------------------------
# ----------------------------------------------------------------------------------------------
# ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
# ----------------------------------------------------------------------------------------------
#
# User variables can be adjusted in Master.conf
#
# Scripts now just contain runtime logic
#
# This new setup allows for profiles and arguments to use the core script
# ----------------------------------------------------------------------------------------------
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
# ----------------------------------------------------------------------------------------------
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Configurable variables
# ----------------------------- # Core System
REPO_SSH="git@192.168.50.2:FailedProxy/Unraid_Scripts.git" source "$SCRIPT_DIR/../Master.conf"
TARGET_DIR="/mnt/user/appdata/unraid_scripts" source "$SCRIPT_DIR/../common.sh"
SSH_KEY="/root/.ssh/id_gitea_rsync"
SSH_PORT=221 parse_args "$@"
# Status Mode
echo "===== GIT SYNC STATUS ====="
echo "Repo: $REPO_SSH"
echo "Target: $TARGET_DIR"
echo "SSH Key: $SSH_KEY"
echo "SSH Port: $SSH_PORT"
echo "Logging: $ENABLE_LOGGING"
echo "Dry Run: $DRY_RUN"
echo "==========================="
exit 0
fi
# Validation
require_var REPO_SSH
require_var TARGET_DIR
require_var SSH_KEY
require_var SSH_PORT
# Start
info "Starting repository sync"
log "Repo: $REPO_SSH"
log "Target: $TARGET_DIR"
# -----------------------------
# Create target directory if it doesn't exist
# -----------------------------
mkdir -p "$TARGET_DIR" mkdir -p "$TARGET_DIR"
cd "$TARGET_DIR" cd "$TARGET_DIR"
# ----------------------------- # Dry Run
# Clone or pull repo (discard local changes) if [[ "$DRY_RUN" == true ]]; then
# ----------------------------- info "Dry-run mode enabled"
if [ -d ".git" ]; then info "Would sync repository: $REPO_SSH"
echo "Repository already exists. Resetting local changes and pulling latest..." info "Would target directory: $TARGET_DIR"
git reset --hard exit 0
git clean -fd
GIT_SSH_COMMAND="ssh -i $SSH_KEY -p $SSH_PORT" git pull
else
echo "Cloning $REPO_SSH into $TARGET_DIR..."
GIT_SSH_COMMAND="ssh -i $SSH_KEY -p $SSH_PORT" git clone "$REPO_SSH" .
fi fi
# ----------------------------- # Git Logic
# Ensure scripts are executable if [[ -d ".git" ]]; then
# ----------------------------- info "Existing repo detected → updating"
echo "Setting executable permissions on scripts..."
log "git reset --hard"
git reset --hard
log "git clean -fd"
git clean -fd
info "Pulling latest changes..."
GIT_SSH_COMMAND="ssh -i $SSH_KEY -p $SSH_PORT" git pull
else
info "No repo found → cloning"
log "git clone $REPO_SSH"
GIT_SSH_COMMAND="ssh -i $SSH_KEY -p $SSH_PORT" \
git clone "$REPO_SSH" .
fi
# Permissions
info "Setting script permissions..."
find "$TARGET_DIR" -type f -name "*.sh" -exec chmod +x {} \; find "$TARGET_DIR" -type f -name "*.sh" -exec chmod +x {} \;
echo "Repository is up to date and scripts are executable." # Summary
echo "===== GIT SYNC SUMMARY ====="
echo "Repository: $REPO_SSH"
echo "Directory: $TARGET_DIR"
echo "Status: SUCCESS"
echo "Logging: $ENABLE_LOGGING"
echo "Dry Run: $DRY_RUN"
echo "============================"
info "Repository sync complete"
+24 -7
View File
@@ -1,5 +1,22 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
# --------------------------------- Rsync Core Script ------------------------------------------
# ----------------------------------------------------------------------------------------------
# ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
# ----------------------------------------------------------------------------------------------
#
# User variables can be adjusted in Master.conf
#
# Scripts now just contain runtime logic
#
# This new setup allows for profiles and arguments to use the core script
#
# Use arguments in unRAID User Plugin for directory
# Example = /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run
# ----------------------------------------------------------------------------------------------
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
# ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -7,7 +24,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../Master.conf" source "$SCRIPT_DIR/../Master.conf"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
# ----------------------------- Input ----------------------------- # Input
DIRECTORY="$1" DIRECTORY="$1"
if [[ -z "$DIRECTORY" ]]; then if [[ -z "$DIRECTORY" ]]; then
echo "Usage: $0 <directory-to-sync> [--dry-run] [VAR=value ...]" echo "Usage: $0 <directory-to-sync> [--dry-run] [VAR=value ...]"
@@ -16,11 +33,11 @@ fi
shift shift
parse_args "$@" parse_args "$@"
# ----------------------------- Host & IP ----------------------------- # Host & IP
detect_hosts detect_hosts
resolve_remote_ip resolve_remote_ip
# ----------------------------- Profile ----------------------------- # Profile
PROFILE_NAME=$(basename "$DIRECTORY" | tr '[:upper:]' '[:lower:]') PROFILE_NAME=$(basename "$DIRECTORY" | tr '[:upper:]' '[:lower:]')
MAX_RSYNC_PROCS=${PROFILE_MAX_PROCS[$PROFILE_NAME]:-$MAX_RSYNC_PROCS} MAX_RSYNC_PROCS=${PROFILE_MAX_PROCS[$PROFILE_NAME]:-$MAX_RSYNC_PROCS}
@@ -32,14 +49,14 @@ RETRY_COUNT=${PROFILE_RETRY_COUNT[$PROFILE_NAME]:-$RETRY_COUNT}
SLEEP=${PROFILE_SLEEP[$PROFILE_NAME]:-$SLEEP} SLEEP=${PROFILE_SLEEP[$PROFILE_NAME]:-$SLEEP}
EXCLUDE_DIRS=(${PROFILE_EXCLUDE_DIRS[$PROFILE_NAME]:-${EXCLUDE_DIRS[@]}}) EXCLUDE_DIRS=(${PROFILE_EXCLUDE_DIRS[$PROFILE_NAME]:-${EXCLUDE_DIRS[@]}})
# ----------------------------- Status Mode ----------------------------- # Status Mode
if [[ "$SHOW_STATUS" == true ]]; then if [[ "$SHOW_STATUS" == true ]]; then
show_status show_status
exit 0 exit 0
fi fi
# ----------------------------- User Info ----------------------------- # User Info
echo "============================================================" echo "============================================================"
echo " Sync Job Starting" echo " Sync Job Starting"
echo "------------------------------------------------------------" echo "------------------------------------------------------------"
@@ -53,7 +70,7 @@ log "Settings: MAX_RSYNC_PROCS=$MAX_RSYNC_PROCS, BW_LIMIT=$BW_LIMIT"
log "Containers: ${CRITICAL_CONTAINER_NAMES[*]}" log "Containers: ${CRITICAL_CONTAINER_NAMES[*]}"
log "Excludes: ${EXCLUDE_DIRS[*]}" log "Excludes: ${EXCLUDE_DIRS[*]}"
# ----------------------------- Rsync Wait ----------------------------- # Rsync Wait
wait_for_rsync() { wait_for_rsync() {
for attempt in $(seq 1 "$RETRY_COUNT"); do for attempt in $(seq 1 "$RETRY_COUNT"); do
RSYNC_COUNT=$(pgrep -fc "rsync.*root@${REMOTE_SERVER}" || true) RSYNC_COUNT=$(pgrep -fc "rsync.*root@${REMOTE_SERVER}" || true)
@@ -69,7 +86,7 @@ wait_for_rsync() {
exit 1 exit 1
} }
# ----------------------------- Main ----------------------------- # Main
main() { main() {
echo "" echo ""
echo "🔍 Checking remote connectivity..." echo "🔍 Checking remote connectivity..."
+9 -6
View File
@@ -1,17 +1,20 @@
!/bin/bash !/bin/bash
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#------------------------------------- Rsync command ------------------------------------------- # ------------------------------------ Rsync command -------------------------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/ /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#-------------------------------------------- Info --------------------------------------------- # ------------------------------------------- Info ---------------------------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# These global configuartions can be added as arguments at the end of the script after folder location # These global configuartions can be added as arguments at the end of the script after folder location
#
# Its better to add profile in Master.conf for perm changes # Its better to add profile in Master.conf for perm changes
#
# Profiles in Master.conf match the last string of folder location # Profiles in Master.conf match the last string of folder location
#
# if a match is made with a list in Master.conf then the associated profile will be used # if a match is made with a list in Master.conf then the associated profile will be used
# If no match is made it defualts to global defualts # If no match is made it defualts to global defualts
+9 -10
View File
@@ -3,7 +3,7 @@
# ----------------------- Common Helpers for Unraid Scripts ------------------------------------- # ----------------------- Common Helpers for Unraid Scripts -------------------------------------
# ----------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------
# ----------------------------- Output Helpers ----------------------------- # Output Helpers
info() { info() {
echo "[INFO] $*" echo "[INFO] $*"
} }
@@ -20,8 +20,7 @@ log() {
[[ "$ENABLE_LOGGING" == true ]] && echo "[LOG] $*" [[ "$ENABLE_LOGGING" == true ]] && echo "[LOG] $*"
} }
# ----------------------------- Argument Parsing ----------------------------- # Argument Parsing
parse_args() {
DRY_RUN=${DRY_RUN:-false} DRY_RUN=${DRY_RUN:-false}
ENABLE_LOGGING=${ENABLE_LOGGING:-false} ENABLE_LOGGING=${ENABLE_LOGGING:-false}
@@ -79,7 +78,7 @@ parse_args() {
done done
} }
# ----------------------------- Validation ----------------------------- # Validation
require_var() { require_var() {
local var="$1" local var="$1"
if [[ -z "${!var:-}" ]]; then if [[ -z "${!var:-}" ]]; then
@@ -98,7 +97,7 @@ validate_int() {
fi fi
} }
# ----------------------------- Host Detection ----------------------------- # Host Detection
detect_hosts() { detect_hosts() {
LOCAL_HOSTNAME="$(hostname)" LOCAL_HOSTNAME="$(hostname)"
@@ -129,7 +128,7 @@ detect_hosts() {
log "SSH key: $SSH_KEY" log "SSH key: $SSH_KEY"
} }
# ----------------------------- Remote IP ----------------------------- # Remote IP
resolve_remote_ip() { resolve_remote_ip() {
log "Resolving Tailscale IP for $REMOTE_SERVER_NAME..." log "Resolving Tailscale IP for $REMOTE_SERVER_NAME..."
@@ -143,13 +142,13 @@ resolve_remote_ip() {
info "Remote IP: $REMOTE_SERVER" info "Remote IP: $REMOTE_SERVER"
} }
# ----------------------------- Connectivity ----------------------------- # Connectivity
check_remote_online() { check_remote_online() {
log "Pinging $REMOTE_SERVER..." log "Pinging $REMOTE_SERVER..."
ping -c 1 "$REMOTE_SERVER" &>/dev/null ping -c 1 "$REMOTE_SERVER" &>/dev/null
} }
# ----------------------------- Containers ----------------------------- # Containers
declare -a RUNNING_CONTAINERS=() declare -a RUNNING_CONTAINERS=()
stop_containers() { stop_containers() {
@@ -196,7 +195,7 @@ start_containers() {
done done
} }
# ----------------------------- Rsync Options ----------------------------- # Rsync Options
get_rsync_opts() { get_rsync_opts() {
if [[ -n "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]:-}" ]]; then if [[ -n "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]:-}" ]]; then
read -r -a RSYNC_OPTS <<< "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]}" read -r -a RSYNC_OPTS <<< "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]}"
@@ -207,7 +206,7 @@ get_rsync_opts() {
fi fi
} }
# ----------------------------- Status Output ----------------------------- # Status Output
show_status() { show_status() {
echo "===== RSYNC STATUS =====" echo "===== RSYNC STATUS ====="
echo "Local: $LOCAL_SERVER_NAME" echo "Local: $LOCAL_SERVER_NAME"
+3 -4
View File
@@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ------------- Clear Unraid system logs and Docker container logs safely ----------------------
# Clear Unraid system logs and Docker container logs safely # ----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+16 -4
View File
@@ -1,9 +1,21 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ----------- Suppress noisy Docker veth/docker0 syslog messages on Unraid boot ----------------
# Suppress noisy Docker veth/docker0 syslog messages on Unraid boot # ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
# ----------------------------------------------------------------------------------------------
#
# User variables can be adjusted in Master.conf
#
# Scripts now just contain runtime logic
#
# This new setup allows for profiles and arguments to use the core script
# Use arguments in unRAID User Plugin for directory
# Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run
# ----------------------------------------------------------------------------------------------
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
# ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+8 -8
View File
@@ -1,11 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
# --------------------------- Mover Stop Script for Unraid ------------------------------------- # --------------------------- Mover Stop Script for Unraid -------------------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust in Master.conf as needed ---------------------- # ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# User variables can be adjusted in Master.conf # User variables can be adjusted in Master.conf
# #
@@ -14,9 +13,10 @@ set -e
# This new setup allows for profiles and arguments to use the core script # This new setup allows for profiles and arguments to use the core script
# Use arguments in unRAID User Plugin for directory # Use arguments in unRAID User Plugin for directory
# Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run # Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#---------------End Of User Variables, Please adjust in Master.conf as needed ------------------ # -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+16 -4
View File
@@ -1,9 +1,21 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ------------------ Persistently set PHP-FPM pm.max_children on Unraid ------------------------
# Persistently set PHP-FPM pm.max_children on Unraid # ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
# ----------------------------------------------------------------------------------------------
#
# User variables can be adjusted in Master.conf
#
# Scripts now just contain runtime logic
#
# This new setup allows for profiles and arguments to use the core script
# Use arguments in unRAID User Plugin for directory
# Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run
# ----------------------------------------------------------------------------------------------
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
# ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+3 -4
View File
@@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ------------------------ Stop all running Rsync processes for Unraid -------------------------
# Stop all running Rsync processes for Unraid # ----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+8 -8
View File
@@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# ---------------------------- Unattended Reboot Script for Unraid ----------------------------- # ---------------------------- Unattended Reboot Script for Unraid -----------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust in Master.conf as needed ---------------------- # ---------------- User Variables, Please adjust in Master.conf as needed ----------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# #
# User variables can be adjusted in Master.conf # User variables can be adjusted in Master.conf
# #
@@ -13,9 +13,9 @@
# This new setup allows for profiles and arguments to use the core script # This new setup allows for profiles and arguments to use the core script
# Use arguments in unRAID User Plugin for directory # Use arguments in unRAID User Plugin for directory
# Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run # Example: /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh --dry-run
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
#---------------End Of User Variables, Please adjust in Master.conf as needed ------------------ # -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+3 -4
View File
@@ -1,9 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -e
# ----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- # ----------------- Stop all running User Scripts spawned by the User Scripts plugin -----------
# Stop all running User Scripts spawned by the User Scripts plugin # ----------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"
+3 -3
View File
@@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
set -e set -e
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
# ZFS ARC & Memory Snapshot for Unraid # --------------------------- ZFS ARC & Memory Snapshot for Unraid -----------------------------
#----------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../common.sh" source "$SCRIPT_DIR/../common.sh"