Abgleich 2025-07-29

This commit is contained in:
Alf
2025-07-29 15:53:11 +02:00
parent f12d06dcbd
commit 63ac5b74d1
4 changed files with 163 additions and 21 deletions

View File

View File

@ -1,21 +0,0 @@
#!/bin/bash
# Setze Arbeitsverzeichnis
# cd /home/oberkoetter/Dokumente/Git/rettedpv || exit 1
# Pfade definieren
CONFIG="./logrotate.cfg"
STATUS="./logrotate.status"
LOGFILE="./log.txt"
# Prüfe, ob Konfigurationsdatei existiert
if [[ ! -f "$CONFIG" ]]; then
echo "$(date) - Fehler: Konfigurationsdatei '$CONFIG' nicht gefunden." >> "$LOGFILE"
exit 2
fi
# Logrotate ausführen (forcierter Lauf)
logrotate -s "$STATUS" -f "$CONFIG"
# Erfolgs-Log schreiben
echo "$(date) - Logrotate wurde erfolgreich ausgeführt." >> "$LOGFILE"