commit
This commit is contained in:
8
telegraf/rootfs/bin/s6-nuke
Normal file
8
telegraf/rootfs/bin/s6-nuke
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Glances
|
||||
# This file turns s6-nuke into a NOOP to prevent total termination
|
||||
# of the host system since the add-on runs in the same PID namespace.
|
||||
# ==============================================================================
|
||||
echo "S6-NUKE: NOOP"
|
||||
exit 0
|
||||
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"
|
||||
3
telegraf/rootfs/etc/fix-attrs.d/scripts
Normal file
3
telegraf/rootfs/etc/fix-attrs.d/scripts
Normal file
@@ -0,0 +1,3 @@
|
||||
/etc/telegraf/telegraf.conf false root 0755 0755
|
||||
/usr/bin/tele.sh false root 0755 0755
|
||||
/usr/bin/telegraf.sh false root 0755 0755
|
||||
8
telegraf/rootfs/etc/services.d/telegraf/finish
Normal file
8
telegraf/rootfs/etc/services.d/telegraf/finish
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/execlineb -S0
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Telegraf
|
||||
# ==============================================================================
|
||||
if -n { s6-test $# -ne 0 }
|
||||
if -n { s6-test ${1} -eq 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
10
telegraf/rootfs/etc/services.d/telegraf/run
Normal file
10
telegraf/rootfs/etc/services.d/telegraf/run
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Example
|
||||
# Runs example1 script
|
||||
# ==============================================================================
|
||||
|
||||
|
||||
bashio::log.info "Starting Telegraf"
|
||||
|
||||
exec telegraf
|
||||
5975
telegraf/rootfs/etc/telegraf/telegraf.conf
Normal file
5975
telegraf/rootfs/etc/telegraf/telegraf.conf
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user