Existing condition for the upping the interface asks for all 3 checks to have positive values (RX, TX and TT). However this is not necessary as some can be set to 0 to disable the check.
This modification makes sure that if the above checks for RX, TX and TT values have failed, thus the usage is still below the set quota, the interface is set to be up.
Thanks to this modification its possible to set only one check positive (e.g. TT) and let the script automatically down and up the interface as expected.
vnstat by default reports the values in bits, however the OMR UI configuration asks values to be given in kbits. This commit fixes the omr-quota script by converting vnstat output to kbits.
* Fix typo on omr-quota
vnstat json does not contain a field named "months". The name of the field id "month". This causes this script to not manage quotas.
* agree to contribution terms