Copied code from the bash framework and add json based config file support
This commit is contained in:
parent
3ccf356c11
commit
6d893a43a6
3 changed files with 78 additions and 10 deletions
13
band.bash
13
band.bash
|
@ -1,6 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Requires vnstat to be running on target system
|
||||
|
||||
set -eo pipefail # you cann add u into -eo, but it drives me nuts so I won't
|
||||
|
||||
if [[ -n "${BASHD_DEBUG}" ]]; then # a inevitability that this will be used
|
||||
set -x
|
||||
fi
|
||||
|
||||
trap cleanup EXIT # A little more robust cleanup
|
||||
|
||||
cleanup() {
|
||||
# We can clean up any temp files or what nots, but for now a place holder
|
||||
true
|
||||
}
|
||||
|
||||
# initial values
|
||||
mtotal=1000 # monthly total in GB for high end cut off
|
||||
dmax=40 # daily max usage value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue