1st commit

This commit is contained in:
2025-10-05 15:41:11 +02:00
commit 2f8f75dfa1
8 changed files with 251 additions and 0 deletions

15
sh/hotdisk_logger.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
CONF_FILE="/etc/hdd_temp_monitor.conf"
source "$CONF_FILE"
LOGROTATE_FILE="/etc/logrotate.d/hotdisk"
sudo tee "$LOGROTATE_FILE" > /dev/null <<EOF
$LOG_FILE {
$LOG_ROTATE_PERIOD
rotate $LOG_ROTATE_COUNT
compress
missingok
notifempty
copytruncate
}
EOF
echo "Logrotate configuration generated at $LOGROTATE_FILE"