Skip to content
Snippets Groups Projects
Commit 923fe8ff authored by Vladimír Štill's avatar Vladimír Štill
Browse files

Move dfwatch journal-checker into absible to allow templating them

parent f143f0c7
No related branches found
No related tags found
No related merge requests found
......@@ -362,8 +362,8 @@
groups: ["systemd-journal"]
- name: "Journal checker"
copy:
src: "../bin/{{item}}"
template:
src: "{{item}}.j2"
dest: "/usr/bin/{{item}}"
mode: "u=rx,g=rx,o=rx"
loop:
......
......@@ -3,6 +3,7 @@
DFFILT="-x tmpfs -x devtmpfs -l"
FSFILT='\(/mnt/xstill\)'
MAIL=mail
MAIL_TO={{admin_email}}
if ! which $MAIL >&/dev/null; then
MAIL=bsd-mailx
fi
......@@ -30,6 +31,6 @@ FULL=$(df --output=pcent,avail,target,size $DFFILT | tail -n+2 | sed -e 's/^[ ]*
done)
if test -n "$FULL"; then
df -h $DFFILT | $MAIL -s "[DF:$(hostname)] Full: $FULL" xstill@fi.muni.cz
df -h $DFFILT | $MAIL -s "[DF:$(hostname)] Full: $FULL" ${MAIL_TO}
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment