mandate METRICCD_HOST at installation time
[metriccd.git] / client / collect
blob103b64bdcf1b7609cd4723fb7f71bebb1df065d4
1 #!/bin/bash
3 set -u
4 set -e
6 if [ $# -gt 0 ]
7 then
8 meter_script_paths=()
9 for meter_name in "$@"
11 meter_script_paths+=("${0%/*}/meter/$meter_name")
12 done
13 else
14 meter_script_paths=("${0%/*}"/meter/*)
17 for meter_script_path in "${meter_script_paths[@]}"
19 if [ -f "$meter_script_path" -a -x "$meter_script_path" ]
20 then
21 meter_name=${meter_script_path##*/}
22 PERL5LIB="${0%/*}${PERL5LIB:+:$PERL5LIB}" "$meter_script_path" | prefixlines "$meter_name."
24 done