|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#!/usr/bin/env bash |
|
|
|
|
|
|
|
|
|
set +euf +o pipefail |
|
|
|
|
set -euf +o pipefail |
|
|
|
|
|
|
|
|
|
cd "$(dirname $0)" |
|
|
|
|
|
|
|
|
|
@ -33,6 +33,11 @@ do |
|
|
|
|
esac |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
if [ ! -x ./node_exporter ] |
|
|
|
|
then |
|
|
|
|
echo './node_exporter not found. Consider running `go build` first.' >&2 |
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
./node_exporter \ |
|
|
|
|
-collector.procfs="collector/fixtures/proc" \ |
|
|
|
|
@ -62,6 +67,7 @@ finish() { |
|
|
|
|
then |
|
|
|
|
kill -9 "$(cat ${tmpdir}/node_exporter.pid)" |
|
|
|
|
# This silences the "Killed" message |
|
|
|
|
set +e |
|
|
|
|
wait "$(cat ${tmpdir}/node_exporter.pid)" > /dev/null 2>&1 |
|
|
|
|
rm -rf "${tmpdir}" |
|
|
|
|
fi |
|
|
|
|
|