diff --git a/scripts/x22-log-backfill.sh b/scripts/x22-log-backfill.sh index ee01ba7..117656d 100644 --- a/scripts/x22-log-backfill.sh +++ b/scripts/x22-log-backfill.sh @@ -37,7 +37,11 @@ log "Bestandsaufnahme der Apache-Logs (aendert nichts) …" mkdir -p /tmp/x22-archiv curl -fsSL -m 30 "$REPO_RAW/scripts/apache-log-survey.py" -o /tmp/x22-archiv/survey.py \ || die "survey.py konnte nicht geladen werden." -python3 /tmp/x22-archiv/survey.py --node "$NODE" 2>&1 | tee /tmp/x22-archiv/bestand.txt +# ACHTUNG: der Survey kennt KEIN --node (er beschreibt nur den lokalen Host). +# Der Fortschritt wird nach stdout UND in die Datei geschrieben; das Skript +# erzwingt Zeilenpufferung, sonst bleibt bestand.txt bei einer Pipe bis zum +# Prozessende leer und der laufende Scan sieht wie ein Haenger aus. +python3 /tmp/x22-archiv/survey.py 2>&1 | tee /tmp/x22-archiv/bestand.txt # Wie viel Historie liegt wirklich vor? Das entscheidet ueber den Nutzen. FILES=$(find /var/log/apache2 /home/users -name 'access.log*' -o -name 'error.log*' 2>/dev/null | wc -l)