From d36bf2981e438855a0da5904d9131b2737da6107 Mon Sep 17 00:00:00 2001 From: Oxbian Date: Mon, 24 Apr 2023 13:15:49 +0200 Subject: Adding matrix-sender submodules & logwatch.sh --- logwatch.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 logwatch.sh (limited to 'logwatch.sh') diff --git a/logwatch.sh b/logwatch.sh new file mode 100755 index 0000000..4081489 --- /dev/null +++ b/logwatch.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Scripts to send logwatch log to matrix + +#set -x + +# Ensure the logwatch folder exist +mkdir -p /var/cache/logwatch + +# matrix.sh absolute path +MATRIX_SH_PATH='' + +# Variable +today=$(date +%d-%m-%Y) +filename=/var/cache/logwatch/$today-logwatch.html + +# Execute +/usr/sbin/logwatch --output file --format html --filename $filename +$MATRIX_SH_PATH -html $(cat $filename) -- cgit v1.2.3