2022-06-30 17:56:31 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Username / password are best stored in an env file rather than a Nomad job file
|
|
|
|
if [[ -r "/srv/env" ]]; then
|
|
|
|
#shellcheck disable=SC2046
|
|
|
|
export $(xargs </srv/env);
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n "${MQTT_SERVER}" ]]; then
|
|
|
|
JSON2COLLECTDMQTT_ARGS="${JSON2COLLECTDMQTT_ARGS} --server ${MQTT_SERVER}";
|
|
|
|
fi
|
|
|
|
|
2022-06-30 21:36:16 +00:00
|
|
|
export MQTT_USERNAME;
|
|
|
|
export MQTT_PASSWORD;
|
|
|
|
export JSON2COLLECTDMQTT_ARGS;
|
|
|
|
|
|
|
|
exec json2collectdmqtt start;
|