From 4696d140aa466d142e5e2a0cf476d9c55c0b51df Mon Sep 17 00:00:00 2001 From: genofire Date: Tue, 20 Oct 2020 14:08:28 +0200 Subject: [PATCH] Use s6-log's native readiness notification support. Fixes #9 --- roles/bhyve-s6/templates/bhyve-log/run.j2 | 9 +-------- roles/haproxy/templates/haproxy-log/run.j2 | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/roles/bhyve-s6/templates/bhyve-log/run.j2 b/roles/bhyve-s6/templates/bhyve-log/run.j2 index 10a611e..d043d5e 100644 --- a/roles/bhyve-s6/templates/bhyve-log/run.j2 +++ b/roles/bhyve-s6/templates/bhyve-log/run.j2 @@ -17,14 +17,7 @@ ifelse -n { install -d -o "${USER}" -g "${GROUP}" -m "${MODE}" "$DIR" } { false } -ifelse -n { fdmove 1 3 echo } { - foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Failed to signal readiness." } - false -} - -foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Ready." } - fdmove -c 2 1 s6-envuidgid $USER -s6-log T $DIR +s6-log -d 3 T $DIR diff --git a/roles/haproxy/templates/haproxy-log/run.j2 b/roles/haproxy/templates/haproxy-log/run.j2 index 2c30043..1f9904f 100644 --- a/roles/haproxy/templates/haproxy-log/run.j2 +++ b/roles/haproxy/templates/haproxy-log/run.j2 @@ -17,14 +17,7 @@ ifelse -n { install -d -o "${USER}" -g "${GROUP}" -m "${MODE}" "$DIR" } { false } -ifelse -n { fdmove 1 3 echo } { - foreground { fdmove -c 1 2 echo "${NAME} log: Failed to signal readiness." } - false -} - -foreground { fdmove -c 1 2 echo "${NAME} log: Ready." } - fdmove -c 2 1 s6-envuidgid $USER -s6-log T $DIR +s6-log -d 3 T $DIR