#!/usr/local/bin/cbsd
#v12.0.0
CIXARG="jname"
CIXOPTARG=""
MYDESC="Return 1 when bhyve with $jname process exist ( + output vm_pid and vm_state ) and 0 when not"
CBSDMODULE="bhyve"

. ${subrdir}/nc.subr
cixinit
. ${subrdir}/bhyve.subr

check_for_bhyve_process -j ${jname}
ret=$?

if [ -n "${vm_pid}" ]; then
	echo "${vm_pid}"
fi

exit ${ret}
