[modify] add a condition to determine if the file is empty
This commit is contained in:
parent
e0cdc133a2
commit
ac2ee2f48c
@ -10,6 +10,8 @@ while read line; do
|
||||
fi
|
||||
done < /opt/logs/docker_status.log
|
||||
|
||||
if [[ -s /tmp/docker_alarm.log ]]; then
|
||||
alarm=`cat /tmp/docker_alarm.log`
|
||||
python3 /opt/scripts/alert/sendmail.py "Docker Alarms" "$alarm"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user