aboutsummaryrefslogblamecommitdiffstats
path: root/testing/prometheus-node-exporter/node-exporter.initd
blob: 5bd9839fe8b073778ecfec6bf857cbf17f14e066 (plain) (tree)





















                                                                      
#!/sbin/openrc-run

command="/usr/bin/node_exporter"
command_args="$ARGS"
command_background="yes"
group="prometheus"
user="prometheus"

logdir="/var/log/prometheus"
logfile="$logdir/${SVCNAME}.log"
pidfile="/var/run/${SVCNAME}.pid"
start_stop_daemon_args="--stderr $logfile --user $user --group $group"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -o $user:$group -m755 $logdir
	checkpath -f -o $user:$group -m644 $logfile
}