diff --git a/metrics.sh b/metrics.sh index c6bd614..9a7c672 100755 --- a/metrics.sh +++ b/metrics.sh @@ -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 diff --git a/reporters/file.sh b/reporters/file.sh index 0991c99..da2a994 100644 --- a/reporters/file.sh +++ b/reporters/file.sh @@ -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