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:
2026-03-24 00:28:11 +00:00
parent efb35cd9c4
commit 9300ae11c2
10 changed files with 454 additions and 90 deletions
+9 -8
View File
@@ -7,7 +7,6 @@
#-----------------------------------------------------------------------------------------------
#
# 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
#
@@ -27,23 +26,25 @@ load_master_conf
# Parse CLI args (flags + VAR=value)
parse_args "$@"
# Validate SLEEP
validate_int SLEEP "$SLEEP"
# Validate REBOOT_SLEEP
validate_int REBOOT_SLEEP "$REBOOT_SLEEP"
# --- Functions
notify_users() {
wall "⚠️ Unraid server will reboot in ${SLEEP} second(s). Save your work."
wall "⚠️ Unraid server will reboot in ${REBOOT_SLEEP} second(s). Save your work."
}
# --- MAIN
echo "==== Scheduled Reboot Script Started: $(date) ===="
# Optional warning before reboot
if [ "$SLEEP" -gt 0 ]; then
if [ "$REBOOT_SLEEP" -gt 0 ]; then
notify_users
sleep "$SLEEP"
sleep "$REBOOT_SLEEP"
fi
# Stop Docker