From fb4fdab433790bf6a1871fa4f1ab76c5355c16c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9dard-Couture?= Date: Fri, 19 Apr 2024 10:48:10 -0400 Subject: [PATCH] Clear log files upon service restart to avoid misleading log rewrites (#2819) --- install/frigate-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index f8a4aa62..ce3c81a0 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -191,6 +191,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/go2rtc/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run StandardOutput=file:/dev/shm/logs/go2rtc/current StandardError=file:/dev/shm/logs/go2rtc/current @@ -212,6 +213,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/frigate/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run StandardOutput=file:/dev/shm/logs/frigate/current StandardError=file:/dev/shm/logs/frigate/current @@ -233,6 +235,7 @@ Type=simple Restart=always RestartSec=1 User=root +ExecStartPre=+rm /dev/shm/logs/nginx/current ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run StandardOutput=file:/dev/shm/logs/nginx/current StandardError=file:/dev/shm/logs/nginx/current