mirror of
https://github.com/openwrt/packages.git
synced 2026-01-08 03:30:19 +04:00
telegraf: use uci-defaults for config generation
use uci-defaults to generate default config to improve maintanability Signed-off-by: Niklas Thorild <niklas@thorild.se>
This commit is contained in:
committed by
Hannu Nyman
parent
b69c93eba5
commit
10a1f2d898
@@ -115,7 +115,8 @@ define Package/telegraf/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
$(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
|
||||
$(INSTALL_BIN) ./files/etc/init.d/telegraf $(1)/etc/init.d/telegraf
|
||||
$(INSTALL_CONF) ./files/etc/telegraf.conf $(1)/etc/telegraf.conf
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-telegraf $(1)/etc/uci-defaults/90-telegraf
|
||||
endef
|
||||
|
||||
define Package/telegraf-full/install
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
8
utils/telegraf/files/etc/uci-defaults/90-telegraf
Executable file
8
utils/telegraf/files/etc/uci-defaults/90-telegraf
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Generates default telegraf.conf if it doesn't already exist
|
||||
|
||||
[ -f /etc/telegraf.conf ] && exit 0
|
||||
|
||||
/usr/bin/telegraf config create > /etc/telegraf.conf
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user