114 lines
4.8 KiB
Bash
114 lines
4.8 KiB
Bash
#!/bin/bash
|
|
#-----------------------------------------------------------------------------------------------
|
|
#----------------------------- Master Variables for unRAID scripts -----------------------------
|
|
#-----------------------------------------------------------------------------------------------
|
|
|
|
# Hostnames of both servers, used for SSH key mapping and remote detection (Actual UunRAID's Host Names)
|
|
HOST1="unRAID-Gmer4Lfe"
|
|
HOST2="unRAID-Jayred365"
|
|
|
|
# SSH Key Mapping (used for rsync scripts to determine which SSH key to use based on source and destination)
|
|
declare -A SSH_KEYS
|
|
SSH_KEYS["unRAID-Gmer4Lfe|unRAID-Jayred365"]="/root/.ssh/Gmer4Lfe-rsync-key"
|
|
SSH_KEYS["unRAID-Jayred365|unRAID-Gmer4Lfe"]="/root/.ssh/Jayred365-rsync-key"
|
|
|
|
#-----------------------------------------------------------------------------------------------
|
|
#----------------- User Variables, Please adjust here in Master.conf as needed -----------------
|
|
#-----------------------------------------------------------------------------------------------
|
|
|
|
#--------------------Rsync Script Defaults-----------------------
|
|
# Network speed limit (KB/s)
|
|
BW_LIMIT=12500
|
|
# Retry logic
|
|
RETRY_COUNT=3
|
|
# Sleep between retries (seconds)
|
|
SLEEP=300
|
|
# Max number of concurrently running rsync processes
|
|
MAX_RSYNC_PROCS=1
|
|
# Container start/stop/restart before and after rsync
|
|
CRITICAL_CONTAINER_NAMES=("")
|
|
# Containers that need delayed before starting
|
|
DELAYED_CONTAINERS=("")
|
|
# Delay in seconds between starting containers, useful for things like Authelia
|
|
CONTAINER_DELAY=5
|
|
# Not include logs during transfer
|
|
EXCLUDE_DIRS=("")
|
|
|
|
#-------------------- unRAID essentail scripts ------------------
|
|
# unRAID reboot script user warning time (seconds)
|
|
REBOOT_SLEEP=300
|
|
# unRAID mover stop script timeout (seconds)
|
|
MOVER_STOP_TIMEOUT=300
|
|
# docker_syslog_filter.sh filter file path
|
|
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_fpm_max_children.sh max children value
|
|
PHP_MAX_CHILDREN=250
|
|
|
|
#----------------------------------------------------------------------------------------------
|
|
#----------------------------------- Profile System -------------------------------------------
|
|
#----------------------------------------------------------------------------------------------
|
|
# Profiles are mainly used for rsync operations, but can be used for any variable that needs
|
|
# to be different based on the source or destination.
|
|
#
|
|
# Profiles are inferred from the directory basename (lowercased)
|
|
|
|
declare -A PROFILE_MAX_PROCS
|
|
PROFILE_MAX_PROCS["arrs_stack"]=2
|
|
PROFILE_MAX_PROCS["critical-data"]=2
|
|
PROFILE_MAX_PROCS["gmer4lfe"]=1
|
|
PROFILE_MAX_PROCS["important-data"]=2
|
|
PROFILE_MAX_PROCS["emby"]=1
|
|
|
|
declare -A PROFILE_BW_LIMIT
|
|
PROFILE_BW_LIMIT["arrs_stack"]=5000
|
|
PROFILE_BW_LIMIT["critical-data"]=9500
|
|
PROFILE_BW_LIMIT["gmer4lfe"]=8000
|
|
PROFILE_BW_LIMIT["important-data"]=9500
|
|
PROFILE_BW_LIMIT["emby"]=8000
|
|
|
|
declare -A PROFILE_RETRY_COUNT
|
|
PROFILE_RETRY_COUNT["arrs_stack"]=3
|
|
PROFILE_RETRY_COUNT["critical-data"]=3
|
|
PROFILE_RETRY_COUNT["gmer4lfe"]=3
|
|
PROFILE_RETRY_COUNT["important-data"]=3
|
|
PROFILE_RETRY_COUNT["emby"]=3
|
|
|
|
declare -A PROFILE_SLEEP
|
|
PROFILE_SLEEP["arrs_stack"]=300
|
|
PROFILE_SLEEP["critical-data"]=300
|
|
PROFILE_SLEEP["gmer4lfe"]=300
|
|
PROFILE_SLEEP["important-data"]=300
|
|
PROFILE_SLEEP["emby"]=300
|
|
|
|
declare -A PROFILE_CRITICAL_CONTAINER_NAMES
|
|
PROFILE_CRITICAL_CONTAINER_NAMES["arrs_stack"]="Sonarr Lidarr Readarr Radarr Prowlarr Bazarr Pinchflat"
|
|
PROFILE_CRITICAL_CONTAINER_NAMES["critical-data"]="Mariadb-Authelia Redis-Authelia Lldap-Gmer4Lfe NginxProxyManager Authelia"
|
|
PROFILE_CRITICAL_CONTAINER_NAMES["gmer4lfe"]="Organizrv2-Gmer4Lfe UptimeKuma-Gmer4Lfe VaultWarden-Gmer4Lfe"
|
|
PROFILE_CRITICAL_CONTAINER_NAMES["important-data"]="Postgres-NextCloud NextCloud"
|
|
PROFILE_CRITICAL_CONTAINER_NAMES["emby"]=""
|
|
|
|
declare -A PROFILE_DELAYED_CONTAINERS
|
|
PROFILE_DELAYED_CONTAINERS["arrs_stack"]=""
|
|
PROFILE_DELAYED_CONTAINERS["critical-data"]="Authelia"
|
|
PROFILE_DELAYED_CONTAINERS["gmer4lfe"]=""
|
|
PROFILE_DELAYED_CONTAINERS["important-data"]="NextCloud"
|
|
PROFILE_DELAYED_CONTAINERS["emby"]=""
|
|
|
|
declare -A PROFILE_CONTAINER_DELAY
|
|
PROFILE_CONTAINER_DELAY["arrs_stack"]=5
|
|
PROFILE_CONTAINER_DELAY["critical-data"]=10
|
|
PROFILE_CONTAINER_DELAY["gmer4lfe"]=5
|
|
PROFILE_CONTAINER_DELAY["important-data"]=10
|
|
PROFILE_CONTAINER_DELAY["emby"]=5
|
|
|
|
declare -A PROFILE_EXCLUDE_DIRS
|
|
PROFILE_EXCLUDE_DIRS["arrs_stack"]="logs *.tmp"
|
|
PROFILE_EXCLUDE_DIRS["critical-data"]="logs *.tmp"
|
|
PROFILE_EXCLUDE_DIRS["gmer4lfe"]="logs *.tmp"
|
|
PROFILE_EXCLUDE_DIRS["important-data"]="logs *.tmp"
|
|
PROFILE_EXCLUDE_DIRS["emby"]="logs *.tmp"
|
|
#-----------------------------------------------------------------------------------------------
|
|
#---------------End Of User Variables, Please adjust here in Master.conf as needed -------------
|
|
#----------------------------------------------------------------------------------------------- |