-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathentrypoint.sh
executable file
·22 lines (14 loc) · 1.09 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
EXPORTER_ARGS=""
[[ -z "${DEBUG}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} -d"
[[ -z "${GPSD_HOST}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --hostname ${GPSD_HOST}"
[[ -z "${GPSD_PORT}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --port ${GPSD_PORT}"
[[ -z "${EXPORTER_PORT}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --exporter-port ${EXPORTER_PORT}"
[[ -z "${GEOPOINT_LON}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --geopoint-lon ${GEOPOINT_LON}"
[[ -z "${GEOPOINT_LAT}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --geopoint-lat ${GEOPOINT_LAT}"
[[ -z "${GEO_BUCKET_SIZE}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --geo-bucket-size ${GEO_BUCKET_SIZE}"
[[ -z "${GEO_BUCKET_COUNT}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --geo-bucket-count ${GEO_BUCKET_COUNT}"
[[ -z "${PPS_BUCKET_SIZE}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --pps-bucket-size ${PPS_BUCKET_SIZE}"
[[ -z "${PPS_BUCKET_COUNT}" ]] || EXPORTER_ARGS="${EXPORTER_ARGS} --pps-bucket-count ${PPS_BUCKET_COUNT}"
echo ./gpsd_exporter.py -v --pps-histogram --offset-from-geopoint $EXPORTER_ARGS
./gpsd_exporter.py -v --pps-histogram --offset-from-geopoint $EXPORTER_ARGS