#!/sbin/openrc-run
name="prometheus-node-exporter"
description="prometheus node exporter"
depend() {
need net
}
start() {
ebegin "Starting $name"
start-stop-daemon -C --background --make-pidfile --pidfile /run/$name.pid \
--exec /usr/bin/prometheus_node_exporter -- \
--web.listen-address=127.0.0.1:9100
eend $?
}
stop() {
ebegin "Stopping $name"
start-stop-daemon --stop --exec /usr/bin/prometheus-node-exporter --pidfile /run/$name.pid
eend $?
}