Added system watchdog. and way to many other changes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# ----------------- UNRAID OPS COMMON LIBRARY (STABLE FRAMEWORK v1) ----------------------------
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# Version: 2.3
|
||||
# Version: 2.4
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# Changelog:
|
||||
# v1.0 — Initial stable framework
|
||||
@@ -37,6 +37,9 @@
|
||||
# v2.3 — ICON_NOTIFY added for notification operations
|
||||
# notify() added — shared notification function supporting unRAID native and Discord
|
||||
# NOTIFY_UNRAID and DISCORD_WEBHOOK configured in Master.conf
|
||||
# v2.4 — ICON_CLEAN, ICON_TRASH added for media cleaner operations
|
||||
# ICON_PERMS, ICON_UNLOCKED added for media permissions operations
|
||||
# ICON_REBOOT_SMART added for smart conditional reboot
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -76,7 +79,8 @@ ICON_TIME="⏱️" # duration line
|
||||
|
||||
# System Operations
|
||||
ICON_MOVER="🔃" # mover operations
|
||||
ICON_REBOOT="⚡" # server reboot operations
|
||||
ICON_REBOOT="⚡" # scheduled server reboot
|
||||
ICON_REBOOT_SMART="🚨" # smart conditional reboot triggered
|
||||
ICON_PLUGIN="🧩" # user scripts plugin operations
|
||||
ICON_PHP="👥" # PHP-FPM operations
|
||||
|
||||
@@ -85,6 +89,12 @@ ICON_ZFS="📊" # ZFS ARC statistics
|
||||
ICON_MEM="🧠" # memory status
|
||||
ICON_WATCHDOG="🐾" # docker watchdog monitoring operations
|
||||
|
||||
# Media Operations
|
||||
ICON_CLEAN="🧹" # media cleaner operations
|
||||
ICON_TRASH="🗑️" # files being deleted
|
||||
ICON_PERMS="🔐" # permissions operation / section header
|
||||
ICON_UNLOCKED="🔓" # permissions successfully applied to a share
|
||||
|
||||
# Notifications
|
||||
ICON_NOTIFY="🔔" # notification operations
|
||||
|
||||
@@ -116,7 +126,7 @@ log() {
|
||||
# Discord: requires DISCORD_WEBHOOK to be set to a valid webhook URL.
|
||||
# Severity levels: normal, warning, alert — maps to unRAID notification severity.
|
||||
# Usage: notify "message" "subject" "severity"
|
||||
# notify "Rsync failed: Movies" "Rsync Alert" "alert"
|
||||
# notify "Rsync failed: Movies" "Rsync Alert" "warning"
|
||||
# notify "Daily sync complete" "Daily Sync" "normal"
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
notify() {
|
||||
@@ -139,8 +149,6 @@ notify() {
|
||||
|
||||
# Discord webhook notification
|
||||
if [[ -n "${DISCORD_WEBHOOK:-}" ]]; then
|
||||
local hostname
|
||||
hostname=$(hostname)
|
||||
local payload
|
||||
payload=$(printf '{"content": "%s — **%s**\\n%s"}' \
|
||||
"$ICON_NOTIFY" "$subject" "$message")
|
||||
|
||||
Reference in New Issue
Block a user