diff options
Diffstat (limited to 'community/telegraf/telegraf.initd')
-rw-r--r-- | community/telegraf/telegraf.initd | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/community/telegraf/telegraf.initd b/community/telegraf/telegraf.initd new file mode 100644 index 00000000000..9855687f039 --- /dev/null +++ b/community/telegraf/telegraf.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run + +command="/usr/bin/telegraf" +command_args="$TELEGRAF_OPTS" +command_background=yes +command_user=telegraf:telegraf +pidfile="/run/$RC_SVCNAME.pid" +extra_started_commands="reload" + +depend() { + need net + after firewall +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} |