aboutsummaryrefslogtreecommitdiffstats
path: root/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-10-15 09:21:37 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-10-15 09:21:37 +0300
commit28b9f0736e43d188abc8a5b63eee1e428cca2935 (patch)
tree8f99c06addb532e7a2200ced634b2f0c60aae9e1 /templates/usr_local_bin_pylogsentinel-batch-email.sh.j2
parent9105c2d8936b0256e5aa3068fbeb7cc440144968 (diff)
Add pylogsentinel
Diffstat (limited to 'templates/usr_local_bin_pylogsentinel-batch-email.sh.j2')
-rw-r--r--templates/usr_local_bin_pylogsentinel-batch-email.sh.j214
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2 b/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2
new file mode 100644
index 0000000..d28efd9
--- /dev/null
+++ b/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+FILE=/tmp/pylogsentinel.daily
+
+if [ ! -f "$FILE" ]; then
+ echo "Nothing to do"
+ exit 0
+fi
+
+echo "Sending email"
+cat "$FILE" | mail -s "pylogsentinel alert batch" root
+
+echo "Removing batch file"
+rm "$FILE"