aboutsummaryrefslogtreecommitdiffstats
path: root/roles/host/templates/usr_local_bin_pylogsentinel-batch-email.sh.j2
blob: eebf1e706e17ec0961a35621f9f42fc77885e85a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

FILE=/tmp/pylogsentinel.daily

if [ ! -f "$FILE" ]; then
    echo "Nothing to do"
    exit 0
fi

echo "Sending email"
cat "$FILE" | head -n 5000 | mail -s "pylogsentinel alert batch" root

echo "Removing batch file"
rm "$FILE"