commit
This commit is contained in:
20
telegraf/rootfs/etc/cont-init.d/telegraf.sh
Normal file
20
telegraf/rootfs/etc/cont-init.d/telegraf.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Telegraf
|
||||
# Configures Telegraf
|
||||
# ==============================================================================
|
||||
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"
|
||||
Reference in New Issue
Block a user