Files
hassio-repo/telegraf/run.sh
2022-01-26 21:59:52 +01:00

19 lines
419 B
Bash
Executable File

#!/usr/bin/env bashio
declare influx_un
declare influx_pw
declare influx_ret
declare hostname
bashio::require.unprotected
readonly CONFIG="/etc/telegraf/telegraf.conf"
CUSTOM_CONF=$(bashio::config 'custom_conf.location')
bashio::log.info "Using custom conf file"
rm /etc/telegraf/telegraf.conf
cp "${CUSTOM_CONF}" /etc/telegraf/telegraf.conf
bashio::log.info "Finished updating config, Starting Telegraf"
telegraf