1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus 2019-01-08 16:57:58 +01:00
parent 9c8491fb79
commit ebec0f0e5c

View file

@ -153,8 +153,6 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
exit 0
fi
[ "$multipath_status" = "off" ] || {
mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)"
[ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)"
if [ "$OMR_TRACKER_STATUS_MSG" = "" ]; then
_log "$OMR_TRACKER_DEVICE switched off"
else
@ -177,6 +175,8 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
config_foreach set_route interface $OMR_TRACKER_INTERFACE
fi
[ "$multipath_status" = "off" ] || {
mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)"
[ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)"
if [ "$OMR_TRACKER_STATUS_MSG" = "" ]; then
[ "$mail_alert" = "1" ] && echo -e "Subject: OpenMPTCProuter: $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) is down\n\nOpenMPTCProuter detected a connection failure of $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE)." | sendmail $(uci -q get mail.default.to)
else