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 USER USER
|
|
|
|
importas -i -u GROUP GROUP
|
|
|
|
importas -i -u MODE MODE
|
|
|
|
importas -i -u DIR DIR
|
|
|
|
}
|
|
|
|
|
|
|
|
foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Starting." }
|
|
|
|
|
|
|
|
ifelse -n { install -d -o "${USER}" -g "${GROUP}" -m "${MODE}" "$DIR" } {
|
|
|
|
foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Failed to create logging directory." }
|
|
|
|
false
|
|
|
|
}
|
|
|
|
|
|
|
|
fdmove -c 2 1
|
|
|
|
|
|
|
|
s6-envuidgid $USER
|
2020-10-20 07:08:28 -05:00
|
|
|
s6-log -d 3 T $DIR
|