From 53e3418e5ff092dd055aa01a445d95042112c074 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Sat, 18 Apr 2020 14:14:00 +0100 Subject: [PATCH] Add init.d script for OpenWrt. Signed-off-by: Tom Wilkie --- examples/openwrt-init.d/node_exporter | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 examples/openwrt-init.d/node_exporter diff --git a/examples/openwrt-init.d/node_exporter b/examples/openwrt-init.d/node_exporter new file mode 100755 index 00000000..1aed38be --- /dev/null +++ b/examples/openwrt-init.d/node_exporter @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common + +START=99 + +USE_PROCD=1 +PROG="/usr/bin/node_exporter" +OPTIONS="--web.listen-address=:9100" + +start_service() { + procd_open_instance + procd_set_param command "$PROG" "${OPTIONS}" + procd_close_instance +}