From 58dded8116d69a5570cf72b014cc60602e040dd2 Mon Sep 17 00:00:00 2001 From: kake26 Date: Mon, 9 Jan 2023 14:20:21 -0600 Subject: [PATCH] Update 'Bash/OpenWrt/band.bash' computed max daily was having $md being interpreted as octal when the number started with a leading 0. Thanks bash. Found a fix though, thanks internet. --- Bash/OpenWrt/band.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bash/OpenWrt/band.bash b/Bash/OpenWrt/band.bash index 76c7fa6..f487962 100644 --- a/Bash/OpenWrt/band.bash +++ b/Bash/OpenWrt/band.bash @@ -5,7 +5,7 @@ mtotal=1000 # monthly total in GB for high end cut off dmax=40 # daily max usage value md=`date +%d` # day of the month numerically -cmd=$(($dmax * $md)) # computed max daily +cmd=$((${dmax#0} * ${md#0})) # computed max daily also the cause of my mystery should be fixed now wif="wan" # now vnstat stuff, some of this is specific to openwrt