#!/sbin/openrc-run

: ${INCUS_USER_DAEMON_GROUP:="incus-user"}

command="/usr/sbin/incus-user"
command_args="--group ${INCUS_USER_DAEMON_GROUP}"
command_background="true"
pidfile="/run/incus/${RC_SVCNAME}.pid"

depend() {
	need net cgroups dbus
	use lxcfs
	after firewall
}

start_pre() {
	checkpath --directory "${pidfile%/*}" --mode 0750
}
