#!/sbin/openrc-run

name="prometheus-smtp2go-exporter"

command_user="prometheus:prometheus"

command="/usr/sbin/smtp2go-exporter"
command_args="-apiKey $APIKEY $ARGS"
command_background="yes"

logdir="/var/log/prometheus"
error_log="$logdir/${SVCNAME}.log"
pidfile="/var/run/${SVCNAME}.pid"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -f -o $command_user -m644 $error_log
}
