1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-22 07:17:05 +00:00

Don't use ifquery to check interface state since it is no longer installed (#1689)

This commit is contained in:
Carl Reinke 2019-12-01 14:21:38 -07:00 committed by Joshua Tauberer
parent 802e7a1f4d
commit 960b5d5bbd

View File

@ -53,7 +53,7 @@ find /etc/munin/plugins/ -lname /usr/share/munin/plugins/ntp_ -print0 | xargs -0
# Deactivate monitoring of network interfaces that are not up. Otherwise we can get a lot of empty charts.
for f in $(find /etc/munin/plugins/ \( -lname /usr/share/munin/plugins/if_ -o -lname /usr/share/munin/plugins/if_err_ -o -lname /usr/share/munin/plugins/bonding_err_ \)); do
IF=$(echo $f | sed s/.*_//);
if ! ifquery $IF >/dev/null 2>/dev/null; then
if ! grep -qFx up /sys/class/net/$IF/operstate 2>/dev/null; then
rm $f;
fi;
done