#!/sbin/openrc-run

worker_name="main"

command="/usr/bin/rebuilderd-worker"
command_args="-n $worker_name connect"
command_background="yes"
directory="/var/lib/rebuilderd-worker"
pidfile="/run/rebuilderd-worker-$worker_name.pid"

export REBUILDERD_COOKIE_PATH=/var/lib/rebuilderd/auth-cookie

start_pre() {
	checkpath --directory --owner rebuilderd:rebuilderd --mode 0770 \
		"$directory"
}

depend() {
	need net
	after firewall
}
