Structure change and vissually fixing code to make it easier to read
This commit is contained in:
+41
-36
@@ -1,66 +1,71 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
#----------------------------- Master Variables for unRAID scripts -----------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# This is the master.conf file, it contains all the variables used by
|
||||
# all scripts.
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# ---------------------------- Master Variables for unRAID scripts -----------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# 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.
|
||||
# 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 is where you should adjust any settings or variables
|
||||
# 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
|
||||
HOST1="unRAID-Gmer4Lfe"
|
||||
HOST2="unRAID-Jayred365"
|
||||
HOST1="unRAID-Gmer4Lfe"
|
||||
HOST2="unRAID-Jayred365"
|
||||
# Assign SSH keys for each host pair (adjust paths as needed) HOST1 from above
|
||||
# Must have its key added to HOST1_SSH_Key same applies for HOST2
|
||||
HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key"
|
||||
HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key"
|
||||
HOST1_SSH_KEY="/root/.ssh/Gmer4Lfe-rsync-key"
|
||||
HOST2_SSH_KEY="/root/.ssh/Jayred365-rsync-key"
|
||||
|
||||
# -------------------------- Logging ---------------------------
|
||||
ENABLE_LOGGING=true # false = only echo user-facing messages
|
||||
# -------------------------- Logging ----------------------------
|
||||
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)
|
||||
BW_LIMIT=12500
|
||||
BW_LIMIT=12500
|
||||
# Retry logic
|
||||
RETRY_COUNT=3
|
||||
RETRY_COUNT=3
|
||||
# Sleep between retries (seconds)
|
||||
SLEEP=300
|
||||
SLEEP=300
|
||||
# Max number of concurrently running rsync processes
|
||||
MAX_RSYNC_PROCS=1
|
||||
MAX_RSYNC_PROCS=1
|
||||
# Container start/stop/restart before and after rsync
|
||||
CRITICAL_CONTAINER_NAMES=("")
|
||||
CRITICAL_CONTAINER_NAMES=("")
|
||||
# Containers that need delayed before starting
|
||||
DELAYED_CONTAINERS=("")
|
||||
DELAYED_CONTAINERS=("")
|
||||
# Delay in seconds between starting containers, useful for things like Authelia
|
||||
CONTAINER_DELAY=5
|
||||
CONTAINER_DELAY=5
|
||||
# Not include logs during transfer
|
||||
EXCLUDE_DIRS=("")
|
||||
EXCLUDE_DIRS=("")
|
||||
# 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)
|
||||
REBOOT_SLEEP=300
|
||||
REBOOT_SLEEP=300
|
||||
# unRAID mover stop script timeout (seconds)
|
||||
MOVER_STOP_TIMEOUT=300
|
||||
MOVER_STOP_TIMEOUT=300
|
||||
# docker_syslog_filter.sh filter file path
|
||||
FILTER_FILE="/etc/rsyslog.d/ignore-docker-veth.conf"
|
||||
FILTER_FILE="/etc/rsyslog.d/ignore-docker-veth.conf"
|
||||
# php_fpm_max_children.sh php-fpm config file path
|
||||
PHP_CONF="/etc/php-fpm.d/www.conf"
|
||||
PHP_CONF="/etc/php-fpm.d/www.conf"
|
||||
# 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)
|
||||
# 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
|
||||
|
||||
@@ -12,7 +12,12 @@ in unRAID User Scripts, to use scripts in git
|
||||
add a line pointing to script plus local folder to be synced
|
||||
Exampl = /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/
|
||||
|
||||
This opens the script and passes the folder overas an argument
|
||||
This opens the script and passes the folder over as an argument
|
||||
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
|
||||
|
||||
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
@@ -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
|
||||
set -e
|
||||
|
||||
# -----------------------------
|
||||
# Configurable variables
|
||||
# -----------------------------
|
||||
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
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Core System
|
||||
source "$SCRIPT_DIR/../Master.conf"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
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"
|
||||
cd "$TARGET_DIR"
|
||||
|
||||
# -----------------------------
|
||||
# Clone or pull repo (discard local changes)
|
||||
# -----------------------------
|
||||
if [ -d ".git" ]; then
|
||||
echo "Repository already exists. Resetting local changes and pulling latest..."
|
||||
git reset --hard
|
||||
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" .
|
||||
# Dry Run
|
||||
if [[ "$DRY_RUN" == true ]]; then
|
||||
info "Dry-run mode enabled"
|
||||
info "Would sync repository: $REPO_SSH"
|
||||
info "Would target directory: $TARGET_DIR"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# -----------------------------
|
||||
# Ensure scripts are executable
|
||||
# -----------------------------
|
||||
echo "Setting executable permissions on scripts..."
|
||||
# Git Logic
|
||||
if [[ -d ".git" ]]; then
|
||||
info "Existing repo detected → updating"
|
||||
|
||||
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 {} \;
|
||||
|
||||
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
@@ -1,5 +1,22 @@
|
||||
#!/bin/bash
|
||||
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)"
|
||||
|
||||
@@ -7,7 +24,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../Master.conf"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
# ----------------------------- Input -----------------------------
|
||||
# Input
|
||||
DIRECTORY="$1"
|
||||
if [[ -z "$DIRECTORY" ]]; then
|
||||
echo "Usage: $0 <directory-to-sync> [--dry-run] [VAR=value ...]"
|
||||
@@ -16,11 +33,11 @@ fi
|
||||
shift
|
||||
parse_args "$@"
|
||||
|
||||
# ----------------------------- Host & IP -----------------------------
|
||||
# Host & IP
|
||||
detect_hosts
|
||||
resolve_remote_ip
|
||||
|
||||
# ----------------------------- Profile -----------------------------
|
||||
# Profile
|
||||
PROFILE_NAME=$(basename "$DIRECTORY" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
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}
|
||||
EXCLUDE_DIRS=(${PROFILE_EXCLUDE_DIRS[$PROFILE_NAME]:-${EXCLUDE_DIRS[@]}})
|
||||
|
||||
# ----------------------------- Status Mode -----------------------------
|
||||
# Status Mode
|
||||
if [[ "$SHOW_STATUS" == true ]]; then
|
||||
show_status
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------- User Info -----------------------------
|
||||
# User Info
|
||||
echo "============================================================"
|
||||
echo " Sync Job Starting"
|
||||
echo "------------------------------------------------------------"
|
||||
@@ -53,7 +70,7 @@ log "Settings: MAX_RSYNC_PROCS=$MAX_RSYNC_PROCS, BW_LIMIT=$BW_LIMIT"
|
||||
log "Containers: ${CRITICAL_CONTAINER_NAMES[*]}"
|
||||
log "Excludes: ${EXCLUDE_DIRS[*]}"
|
||||
|
||||
# ----------------------------- Rsync Wait -----------------------------
|
||||
# Rsync Wait
|
||||
wait_for_rsync() {
|
||||
for attempt in $(seq 1 "$RETRY_COUNT"); do
|
||||
RSYNC_COUNT=$(pgrep -fc "rsync.*root@${REMOTE_SERVER}" || true)
|
||||
@@ -69,7 +86,7 @@ wait_for_rsync() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
# ----------------------------- Main -----------------------------
|
||||
# Main
|
||||
main() {
|
||||
echo ""
|
||||
echo "🔍 Checking remote connectivity..."
|
||||
|
||||
+25
-22
@@ -1,17 +1,20 @@
|
||||
!/bin/bash
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
#------------------------------------- Rsync command -------------------------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# ------------------------------------ Rsync command -------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
/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
|
||||
#
|
||||
# Its better to add profile in Master.conf for perm changes
|
||||
#
|
||||
# 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 no match is made it defualts to global defualts
|
||||
|
||||
@@ -20,15 +23,15 @@
|
||||
#----------------------------- Arguments, add after rsync command ------------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# Does a dry run making no changes
|
||||
#--dry-run
|
||||
# --dry-run
|
||||
#
|
||||
#Force logging
|
||||
#--log)
|
||||
# Force logging
|
||||
# --log)
|
||||
#
|
||||
#Force logging to be dissabled
|
||||
#--no-log
|
||||
# Force logging to be dissabled
|
||||
# --no-log
|
||||
#
|
||||
#--help
|
||||
# --help
|
||||
#
|
||||
# Example = /mnt/user/appdata/unraid_scripts/Rsync/rsync.sh /mnt/user/appdata-test/Arrs/ --dry-run --no-log
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
@@ -37,32 +40,32 @@
|
||||
#
|
||||
#
|
||||
# Network speed limit (KB/s)
|
||||
#BW_LIMIT=12500
|
||||
# BW_LIMIT=12500
|
||||
#
|
||||
# Retry logic
|
||||
#RETRY_COUNT=3
|
||||
# RETRY_COUNT=3
|
||||
#
|
||||
# Sleep between retries (seconds)
|
||||
#SLEEP=300
|
||||
# SLEEP=300
|
||||
#
|
||||
# Max number of concurrently running rsync processes
|
||||
#MAX_RSYNC_PROCS=1
|
||||
# MAX_RSYNC_PROCS=1
|
||||
#
|
||||
# Container start/stop/restart before and after rsync
|
||||
#CRITICAL_CONTAINER_NAMES=()
|
||||
# CRITICAL_CONTAINER_NAMES=()
|
||||
#
|
||||
# Containers that need delayed before starting
|
||||
#DELAYED_CONTAINERS=()
|
||||
# DELAYED_CONTAINERS=()
|
||||
#
|
||||
# Delay in seconds between starting containers, useful for things like Authelia
|
||||
#CONTAINER_DELAY=5
|
||||
# CONTAINER_DELAY=5
|
||||
#
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
#---------------End Of User Variables, Please adjust in Master.cong as needed ------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
#
|
||||
#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
|
||||
# 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
|
||||
#
|
||||
# Copy and paste into unRAID User Script plugin
|
||||
@@ -3,7 +3,7 @@
|
||||
# ----------------------- Common Helpers for Unraid Scripts -------------------------------------
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------- Output Helpers -----------------------------
|
||||
# Output Helpers
|
||||
info() {
|
||||
echo "[INFO] $*"
|
||||
}
|
||||
@@ -20,8 +20,7 @@ log() {
|
||||
[[ "$ENABLE_LOGGING" == true ]] && echo "[LOG] $*"
|
||||
}
|
||||
|
||||
# ----------------------------- Argument Parsing -----------------------------
|
||||
parse_args() {
|
||||
# Argument Parsing
|
||||
DRY_RUN=${DRY_RUN:-false}
|
||||
ENABLE_LOGGING=${ENABLE_LOGGING:-false}
|
||||
|
||||
@@ -79,7 +78,7 @@ parse_args() {
|
||||
done
|
||||
}
|
||||
|
||||
# ----------------------------- Validation -----------------------------
|
||||
# Validation
|
||||
require_var() {
|
||||
local var="$1"
|
||||
if [[ -z "${!var:-}" ]]; then
|
||||
@@ -98,7 +97,7 @@ validate_int() {
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------------------------- Host Detection -----------------------------
|
||||
# Host Detection
|
||||
detect_hosts() {
|
||||
LOCAL_HOSTNAME="$(hostname)"
|
||||
|
||||
@@ -129,7 +128,7 @@ detect_hosts() {
|
||||
log "SSH key: $SSH_KEY"
|
||||
}
|
||||
|
||||
# ----------------------------- Remote IP -----------------------------
|
||||
# Remote IP
|
||||
resolve_remote_ip() {
|
||||
log "Resolving Tailscale IP for $REMOTE_SERVER_NAME..."
|
||||
|
||||
@@ -143,13 +142,13 @@ resolve_remote_ip() {
|
||||
info "Remote IP: $REMOTE_SERVER"
|
||||
}
|
||||
|
||||
# ----------------------------- Connectivity -----------------------------
|
||||
# Connectivity
|
||||
check_remote_online() {
|
||||
log "Pinging $REMOTE_SERVER..."
|
||||
ping -c 1 "$REMOTE_SERVER" &>/dev/null
|
||||
}
|
||||
|
||||
# ----------------------------- Containers -----------------------------
|
||||
# Containers
|
||||
declare -a RUNNING_CONTAINERS=()
|
||||
|
||||
stop_containers() {
|
||||
@@ -196,7 +195,7 @@ start_containers() {
|
||||
done
|
||||
}
|
||||
|
||||
# ----------------------------- Rsync Options -----------------------------
|
||||
# Rsync Options
|
||||
get_rsync_opts() {
|
||||
if [[ -n "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]:-}" ]]; then
|
||||
read -r -a RSYNC_OPTS <<< "${PROFILE_RSYNC_OPTS[$PROFILE_NAME]}"
|
||||
@@ -207,7 +206,7 @@ get_rsync_opts() {
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------------------------- Status Output -----------------------------
|
||||
# Status Output
|
||||
show_status() {
|
||||
echo "===== RSYNC STATUS ====="
|
||||
echo "Local: $LOCAL_SERVER_NAME"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
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)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
#!/bin/bash
|
||||
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)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# --------------------------- 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
|
||||
#
|
||||
@@ -14,9 +13,10 @@ set -e
|
||||
# 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 ------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
#!/bin/bash
|
||||
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)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# Stop all running Rsync processes for Unraid
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# ------------------------ Stop all running Rsync processes for Unraid -------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
set -e
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# ---------------------------- 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
|
||||
#
|
||||
@@ -13,9 +13,9 @@
|
||||
# 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 ------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# -------------- End Of User Variables, Please adjust in Master.conf as needed -----------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
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)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ZFS ARC & Memory Snapshot for Unraid
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# --------------------------- ZFS ARC & Memory Snapshot for Unraid -----------------------------
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/../common.sh"
|
||||
|
||||
Reference in New Issue
Block a user