Fix disk health check system

This commit is contained in:
Yan Lin 2025-09-07 13:03:17 +02:00
parent d2bc0a522e
commit 2f6d5123a5
4 changed files with 7 additions and 8 deletions

View file

@ -62,6 +62,11 @@
StandardError = "journal"; StandardError = "journal";
# Add timeout to prevent hanging # Add timeout to prevent hanging
TimeoutStartSec = "300"; # 5 minutes max TimeoutStartSec = "300"; # 5 minutes max
# Set PATH to include system binaries for smartctl and curl
Environment = "PATH=/run/current-system/sw/bin";
# Allow access to block devices for SMART commands
DeviceAllow = [ "/dev/disk/by-id/* rw" "/dev/sd* rw" "/dev/nvme* rw" "char-* rw" "block-* rw" ];
DevicePolicy = "closed";
}; };
}; };
}; };

View file

@ -1,5 +1,3 @@
#!/usr/bin/env bash
# Simple daily SMART report script - plain text version # Simple daily SMART report script - plain text version
# Only checks SMART attributes and sends report via Gotify # Only checks SMART attributes and sends report via Gotify

View file

@ -1,5 +1,3 @@
#!/usr/bin/env bash
# SMART daemon alert script for Gotify notifications # SMART daemon alert script for Gotify notifications
# Called by smartd when SMART issues are detected # Called by smartd when SMART issues are detected
# No arguments needed - uses SMARTD_DEVICE environment variable # No arguments needed - uses SMARTD_DEVICE environment variable

View file

@ -1,5 +1,3 @@
#!/usr/bin/env bash
# Gotify notification script for disk health monitoring # Gotify notification script for disk health monitoring
# Usage: gotify-notify.sh <url> <token> <priority> <title> <message> # Usage: gotify-notify.sh <url> <token> <priority> <title> <message>