ansible/roles/bhyve-s6/templates/bhyve/data/check.j2

20 lines
363 B
Text
Raw Normal View History

2020-09-13 20:52:49 -05:00
#!/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