1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00

Net interface - Set speed to 1000 if -1 is returned

This commit is contained in:
Josué Tille 2024-04-16 22:49:56 +02:00
parent 42e9bdef0c
commit be52f3a414
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -33,6 +33,9 @@ home_dir_filter() {
interface_speed_map() {
while read -r item; do
speed=$(cat /sys/class/net/"$item"/speed 2>/dev/null || echo 1000)
if [ "$speed" == -1 ]; then
speed=1000
fi
echo "$item,$speed"
done
}