[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
|
fi
|
||||||
done < /opt/logs/docker_status.log
|
done < /opt/logs/docker_status.log
|
||||||
|
|
||||||
alarm=`cat /tmp/docker_alarm.log`
|
if [[ -s /tmp/docker_alarm.log ]]; then
|
||||||
python3 /opt/scripts/alert/sendmail.py "Docker Alarms" "$alarm"
|
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