diff options
Diffstat (limited to 'roles/host/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2')
| -rw-r--r-- | roles/host/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/host/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2 b/roles/host/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2 new file mode 100644 index 0000000..d28efd9 --- /dev/null +++ b/roles/host/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" |
