Abgleich 2025-07-29
This commit is contained in:
@ -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"
|
||||
Reference in New Issue
Block a user