Gracefully fail if diskload.ini is not available.
This commit is contained in:
parent
71e652c94f
commit
81b295f4a3
@ -57,5 +57,9 @@ if [ $found = 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e /var/local/emhttp/diskload.ini ]; then
|
||||
read bytes_read bytes_written _ < <(grep $device"=" /var/local/emhttp/diskload.ini | cut -d"=" -f2)
|
||||
echo '"bytes_reading":'$bytes_read', "bytes_writing":'$bytes_written'}'
|
||||
else
|
||||
echo '"diskload_missing":1}'
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user