#!/sbin/openrc-run

name="Prometheus OpenRC exporter"
command="/usr/bin/openrc_exporter"
command_user="prometheus:prometheus"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/var/log/prometheus/openrc-exporter.log"
error_log="/var/log/prometheus/openrc-exporter.log"

depend() {
        need net
        after firewall
}

start_pre() {
	checkpath -d -o ${command_user} -m 0755 /var/log/prometheus
	checkpath -f -o ${command_user} -m 0644 /var/log/prometheus/openrc-exporter.log
}
