aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wilkie <tom@grafana.com>2020-04-18 14:14:00 +0100
committerJohannes 'fish' Ziemke <github@freigeist.org>2020-04-28 16:14:19 +0200
commit53e3418e5ff092dd055aa01a445d95042112c074 (patch)
tree3ccb3c297d735dd8f7f1a41881e90193501915d9
parent01054558c2896a7dda3b5debdb725998555d88db (diff)
downloadprometheus_node_collector-53e3418e5ff092dd055aa01a445d95042112c074.tar.bz2
prometheus_node_collector-53e3418e5ff092dd055aa01a445d95042112c074.tar.xz
prometheus_node_collector-53e3418e5ff092dd055aa01a445d95042112c074.zip
Add init.d script for OpenWrt.
Signed-off-by: Tom Wilkie <tom@grafana.com>
-rwxr-xr-xexamples/openwrt-init.d/node_exporter13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/openwrt-init.d/node_exporter b/examples/openwrt-init.d/node_exporter
new file mode 100755
index 0000000..1aed38b
--- /dev/null
+++ b/examples/openwrt-init.d/node_exporter
@@ -0,0 +1,13 @@
1#!/bin/sh /etc/rc.common
2
3START=99
4
5USE_PROCD=1
6PROG="/usr/bin/node_exporter"
7OPTIONS="--web.listen-address=:9100"
8
9start_service() {
10 procd_open_instance
11 procd_set_param command "$PROG" "${OPTIONS}"
12 procd_close_instance
13}