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

The log sender to use HTTPS

parent 2a376b27
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,12 @@
# List of daemon names. Separate by \|, it's put into the regular expression.
DAEMONS='ucollect\|updater\|watchdog'
# Where to put the logs (don't forget the question mark at the end)
BASEURL='http://securt-test.labs.nic.cz/logsend/upload.cgi?'
BASEURL='https://test.securt.cz/logsend/upload.cgi?'
RID="$(atsha204cmd serial-number)"
CERT="/etc/ssl/startcom-cznic.pem"
# Grep regexp: Month date time hostname something.something daemon
logread | \
/usr/bin/whatsnew /tmp/logs.last.sha1 | \
grep "^[^ ][^ ]* *[0-9][0-9]* *[0-9:][0-9:]* [^ ][^ ]* [a-z][a-z]*\.[a-z][a-z]* \($DAEMONS\)\(\[[0-9]*\]\|\):" | \
curl -T - "$BASEURL$RID" -X POST
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