From 5b1c405fe0215f2bd9ffe465ac14637b83645962 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 2 Dec 2023 17:09:01 +0100 Subject: [PATCH] Send crond output to addon log https://github.com/alexbelgium/hassio-addons/issues/1111 --- .templates/ha_lsio.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.templates/ha_lsio.sh b/.templates/ha_lsio.sh index 61d2d82aa..f12b08b9b 100755 --- a/.templates/ha_lsio.sh +++ b/.templates/ha_lsio.sh @@ -38,6 +38,12 @@ for file in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*; fi done +# Send crond logs to addon logs +if [ -f /etc/s6-overlay/s6-rc.d/svc-cron/run ]; then + sed -i "/exec busybox crond/c exec busybox crond -f -L /proc/1/fd/1 -S -l 5" /etc/s6-overlay/s6-rc.d/svc-cron/run + sed -i "/exec \/usr\/sbin\/cron/c exec /usr/sbin/cron -f -L /proc/1/fd/1 5" /etc/s6-overlay/s6-rc.d/svc-cron/run +fi + # Replace lsiown if not found if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do