#!/sbin/openrc-run
supervisor=supervise-daemon

name="go-mmproxy"
description="A faster & stable implementation of mmproxy"

command=/usr/bin/go-mmproxy
command_args="$go_mmproxy_params"
command_user="root:root"

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

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -o "$command_user" -m 755 -d "$logdir"
	checkpath -o "$command_user" -m 644 -f "$output_log"
	checkpath -o "$command_user" -m 644 -f "$error_log"
}
