Gracefully fail if diskload.ini is not available.
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user