Updated info in all scripts

This commit is contained in:
2026-03-23 23:10:03 +00:00
parent 700614d4bf
commit efb35cd9c4
5 changed files with 47 additions and 24 deletions
+20 -15
View File
@@ -1,12 +1,22 @@
#!/bin/bash
##################################################################################################
############################## Master Variables for unRAID scripts ################################
##################################################################################################
#-----------------------------------------------------------------------------------------------
#----------------------------- Host and Remote Detection ---------------------------------------
#----------------------------- Master Variables for unRAID scripts -----------------------------
#-----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust here in Master.conf as needed -----------------
#-----------------------------------------------------------------------------------------------
# This is the master.conf file, it contains all the variables used by
# all scripts. It is sourced by each script at runtime, so any changes here will
# affect all scripts immediately. This is where you should adjust any settings or variables
# that you want to apply globally across all your scripts
#
#This allows for one centralized location for all your configurations, making it easier to manage
# and maintain your scripts. You can adjust the variables below as needed.
#
#-----------------------------------------------------------------------------------------------
#---------------End Of User Variables, Please adjust here in Master.conf as needed -------------
#-----------------------------------------------------------------------------------------------
# Host and Remote Detection
# Define the hostnames of both servers
HOST1="unRAID-Gmer4Lfe"
HOST2="unRAID-Jayred365"
@@ -25,9 +35,8 @@ fi
echo "Local server: $LOCAL_SERVER_NAME"
echo "Remote server: $REMOTE_SERVER_NAME"
#-----------------------------------------------------------------------------------------------
#--------------------------- Remote Server Ip Resolution ----------------------------------------
#-----------------------------------------------------------------------------------------------
# Remote Server Ip Resolution
# Resolve Tailscale IP dynamically
REMOTE_SERVER=$(tailscale ip -4 "$REMOTE_SERVER_NAME" 2>/dev/null)
if [[ -z "$REMOTE_SERVER" ]]; then
@@ -35,11 +44,8 @@ if [[ -z "$REMOTE_SERVER" ]]; then
exit 1
fi
#-----------------------------------------------------------------------------------------------
#----------------------------- SSH Key Mapping --------------------------------------------------
#-----------------------------------------------------------------------------------------------
declare -A SSH_KEYS
# SSH Key Mapping
SSH_KEYS["$HOST1|$HOST2"]="/root/.ssh/Gmer4Lfe-rsync-key"
SSH_KEYS["$HOST2|$HOST1"]="/root/.ssh/Jayred365-rsync-key"
@@ -73,9 +79,8 @@ DELAYED_CONTAINERS=("")
CONTAINER_DELAY=5
# Not include logs during transfer
EXCLUDE_DIRS=("")
#-----------------------------------------------------------------------------------------------
#----------------------------- Profile System ---------------------------------------------------
#-----------------------------------------------------------------------------------------------
#
# Profile System
# Profiles are inferred from the directory basename (lowercased)
# Max rsync processes per profile
+5 -3
View File
@@ -1,11 +1,14 @@
#!/bin/bash
set -e
#-----------------------------------------------------------------------------------------------
# --------------------------- Core Rsync Script for Unraid -------------------------------------
#-----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust in Master.conf as needed ----------------------
#-----------------------------------------------------------------------------------------------
# This is the main Core Rsync script
#
# 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
@@ -15,9 +18,8 @@ set -e
# /mnt/user/appdata-test/Arrs/ is the argument
# If the last name /Arrs/ matches a profile in Master.conf, then profile defaults are used
# Otherwise, global configuration in Master.conf is used
#
#-----------------------------------------------------------------------------------------------
#---------------End Of User Variables ----------------------------------------------------------
#---------------End Of User Variables, Please adjust in Master.conf as needed ------------------
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+3 -1
View File
@@ -49,4 +49,6 @@
#
#Examples
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/ MAX_RSYNC_PROCS=2
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/ --dry-run MAX_RSYNC_PROCS=2
#/mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/ --dry-run MAX_RSYNC_PROCS=2
#
# Copy and paste into unRAID User Script plugin
+14 -1
View File
@@ -1,7 +1,20 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------
# Common Shared Functions for Unraid Scripts
# --------------------- Common Shared Functions for Unraid Scripts -----------------------------
#-----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust in Master.conf as needed ----------------------
#-----------------------------------------------------------------------------------------------
#
# Nothing to adjust here, all user variables should be in Master.conf
#
# This is just a script that has all common functions and logic that are shared
# between the different scripts.
#
# This way we can avoid code duplication and have a single source
# of truth for all common functions and logic.
#-----------------------------------------------------------------------------------------------
#---------------End Of User Variables, Please adjust in Master.conf as needed ------------------
#-----------------------------------------------------------------------------------------------
# Load Master.conf relative to calling script
+5 -4
View File
@@ -1,20 +1,21 @@
#!/bin/bash
#-----------------------------------------------------------------------------------------------
# ---------------------------- Unattended Reboot Script for Unraid -----------------------------
#-----------------------------------------------------------------------------------------------
#----------------- User Variables, Please adjust in Master.conf as needed ----------------------
#-----------------------------------------------------------------------------------------------
# This is the Unattended Reboot Script for Unraid
#
# User variables can be adjusted in Master.conf
# This script is using the SLEEP Variable from Master.conf for the delay before reboot
#
# 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 ----------------------------------------------------------
#-----------------------------------------------------------------------------------------------
#---------------End Of User Variables, Please adjust in Master.conf as needed ------------------
#-----------------------------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"