From 87dd8de7c291c8bc61bed5801371b394087678eb Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 13 Sep 2024 18:04:13 +0200 Subject: [PATCH] suppress the delayed direct output of pfclient --- rootfs/etc/s6-overlay/scripts/logwatcher | 7 +++++-- rootfs/etc/s6-overlay/scripts/pfclient | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rootfs/etc/s6-overlay/scripts/logwatcher b/rootfs/etc/s6-overlay/scripts/logwatcher index 0af4dbb..2dfed12 100755 --- a/rootfs/etc/s6-overlay/scripts/logwatcher +++ b/rootfs/etc/s6-overlay/scripts/logwatcher @@ -1,5 +1,8 @@ #!/command/with-contenv bash #shellcheck shell=bash -sleep 5 -exec tail -c 100k -F /var/log/pfclient/*.log +while ! pgrep pfclient &>/dev/null; do + sleep 0.5 +done +exec s6wrap --timestamps --quiet --prepend='pfclient_log' --args \ + tail -c 100k -F /var/log/pfclient/*.log diff --git a/rootfs/etc/s6-overlay/scripts/pfclient b/rootfs/etc/s6-overlay/scripts/pfclient index 6c64343..328994a 100755 --- a/rootfs/etc/s6-overlay/scripts/pfclient +++ b/rootfs/etc/s6-overlay/scripts/pfclient @@ -2,7 +2,7 @@ #shellcheck shell=bash exec s6-setuidgid nobody \ -s6wrap --quiet --prepend='pfclient_daemon' --args \ +s6wrap --ignore=stdout --quiet --prepend='pfclient_daemon' --args \ /usr/local/bin/pfclient \ --connection_type=1 \ --address="${BEASTHOST}" \