-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsyncCrawlErrorLogs.sh
More file actions
executable file
·23 lines (20 loc) · 997 Bytes
/
Copy pathsyncCrawlErrorLogs.sh
File metadata and controls
executable file
·23 lines (20 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Dieses Skript führt einen Sync (Abgleich) aus, auf Webcrawling Error Logs in ~/crawlreports/logAnalyses
# vs. Logdateien in den Original-Verzeichnissen /data/wpull-data oder ~/wpull-data-crawldir
# Autor | Datum | Ticket | Änderungsgrund
# -------------+------------+-----------------------------------------------------------
# Ingolf Kuss | 12.06.2025 | TOSDEV-7 | Neuerstellung; auch für TOS-1295
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $scriptdir
source variables.conf
# BEGINN Hauptverarbeitung
# 1. Logs in ~/wpull-data-crawldir
# (gescheiterte oder noch laufende Crawls)
for logdatei in `find ~/wpull-data-crawldir -name crawl.log`; do
# echo "logdatei: $logdatei"
relpath=`echo $(dirname $logdatei) | sed "s#^$HOME/wpull-data-crawldir/##"`
mkdir -p ~/crawlreports/logAnalyses/$relpath
grep ERROR $logdatei > ~/crawlreports/logAnalyses/$relpath/crawlerrors.log
done
# 2. Logs unter /data
# (erfolgreich beendete Crawls)