Skip to content
Snippets Groups Projects
Commit 35624831 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

Extract logs from rotated too

parent 54b030ae
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,10 @@ CERT="/etc/ssl/vorner.pem"
sleep $(( $(tr -cd 0-9 </dev/urandom | head -c 8) % 120 ))
# Grep regexp: Month date time hostname daemon
cat /var/log/messages | \
(
cat /var/log/messages.1 || true
cat /var/log/messages
) | \
/usr/bin/whatsnew /tmp/logs.last.sha1 | \
grep "^[^ ][^ ]* *[0-9][0-9]* *[0-9:][0-9:]* [a-z][a-z]* *\($DAEMONS\)\(\[[0-9]*\]\|\):" | \
curl --cacert "$CERT" -T - "$BASEURL$RID" -X POST
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment