mirror of
https://github.com/pstadler/metrics.sh.git
synced 2025-02-28 13:59:12 -05:00
fix cli options
This commit is contained in:
parent
cab1ad7d0a
commit
e97e43c90e
@ -10,12 +10,12 @@ LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US.UTF-8
|
||||
|
||||
# handle opts
|
||||
opts_spec=":dhvr:"
|
||||
opts_spec=":dhv:r:i:"
|
||||
opt_docs=false
|
||||
opt_verbose=false
|
||||
|
||||
usage () {
|
||||
echo "Usage: $0 [-d] [-h] [-v] [-r]"
|
||||
echo "Usage: $0 [-d] [-h] [-v] [-r repoter] [-i interval]"
|
||||
}
|
||||
|
||||
help () {
|
||||
@ -37,6 +37,9 @@ while getopts "$opts_spec" opt; do
|
||||
r)
|
||||
REPORTER=$OPTARG
|
||||
;;
|
||||
i)
|
||||
INTERVAL=$OPTARG
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
|
@ -3,7 +3,7 @@
|
||||
init () {
|
||||
if [ -z $FILE_LOCATION ]; then
|
||||
echo "Missing configuration: \$FILE_LOCATION"
|
||||
return 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $FILE_LOCATION ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user