#!/sbin/openrc-run

name="ProxyAuth"
description="ProxyAuth Authentication Proxy"

command="/usr/bin/proxyauth"
command_user="proxyauth:proxyauth"
command_background="yes"
directory="/opt/proxyauth"
pidfile="/run/${RC_SVCNAME}.pid"

output_log="/var/log/proxyauth/proxyauth.log"
error_log="/var/log/proxyauth/proxyauth.err"

export RUST_LOG="${RUST_LOG:-info}"

depend() {
    need net
    after firewall
}

start_pre() {
    checkpath -d -o proxyauth:proxyauth -m 0750 /var/log/proxyauth
}
