ansible/roles/bhyve-s6/templates/bhyve/data/check.j2
2020-09-14 03:52:49 +02:00

19 lines
363 B
Django/Jinja

#!/usr/local/bin/execlineb -P
# {{ ansible_managed }}
s6-envdir ./env
multisubstitute {
importas -i -u NAME NAME
importas -i -u PORT PORT
}
ifelse {
redirfd -w 1 /dev/null
fdmove -c 2 1
test -c "/dev/vmm/${NAME}"
} {
foreground { fdmove -c 1 2 echo "bhyve-${NAME}: Ready." }
true
}
foreground { fdmove -c 1 2 echo "bhyve-${NAME}: Poll." }
false