forked from ccchb/ansible
20 lines
363 B
Text
20 lines
363 B
Text
|
#!/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
|