diff options
author | Tom Wilkie <tom@grafana.com> | 2020-04-18 14:14:00 +0100 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2020-04-28 16:14:19 +0200 |
commit | 53e3418e5ff092dd055aa01a445d95042112c074 (patch) | |
tree | 3ccb3c297d735dd8f7f1a41881e90193501915d9 /examples | |
parent | 01054558c2896a7dda3b5debdb725998555d88db (diff) | |
download | prometheus_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>
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/openwrt-init.d/node_exporter | 13 |
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 | |||
3 | START=99 | ||
4 | |||
5 | USE_PROCD=1 | ||
6 | PROG="/usr/bin/node_exporter" | ||
7 | OPTIONS="--web.listen-address=:9100" | ||
8 | |||
9 | start_service() { | ||
10 | procd_open_instance | ||
11 | procd_set_param command "$PROG" "${OPTIONS}" | ||
12 | procd_close_instance | ||
13 | } | ||