aboutsummaryrefslogtreecommitdiff
path: root/logwatch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'logwatch.sh')
-rwxr-xr-xlogwatch.sh18
1 files changed, 18 insertions, 0 deletions
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)
ArKa projects. All rights to me, and your next child right arm.