#!/sbin/openrc-run

name="blackbox_exporter"
description="blackbox exporter for the prometheus monitoring system"
supervisor=supervise-daemon
command=/usr/bin/blackbox_exporter
command_args="--config.file=$blackbox_exporter_config_file \
	$blackbox_exporter_args"
command_user="prometheus:prometheus"
capabilities="^cap_net_raw"

start_pre() {
	[ -n "$output_log" ] && checkpath -f "$output_log" \
		-m 644 -o prometheus:prometheus
	[ -n "$error_log" ] && checkpath -f "$error_log" \
		-m 644 -o prometheus:prometheus
}
