aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prometheus-node-exporter/node-exporter.initd
blob: 5bd9839fe8b073778ecfec6bf857cbf17f14e066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
}