From d85be0851136600e6a4785a3fd04fb38625c2bc7 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Wed, 18 Jan 2023 10:33:42 -0300 Subject: [PATCH] Improve scripts logging --- docker/rootfs/etc/s6-overlay/s6-rc.d/frigate/run | 4 +++- docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/rootfs/etc/s6-overlay/s6-rc.d/frigate/run b/docker/rootfs/etc/s6-overlay/s6-rc.d/frigate/run index 905f4b670..1adf1a0cb 100755 --- a/docker/rootfs/etc/s6-overlay/s6-rc.d/frigate/run +++ b/docker/rootfs/etc/s6-overlay/s6-rc.d/frigate/run @@ -7,7 +7,9 @@ set -o errexit -o nounset -o pipefail # Tell S6-Overlay not to restart this service s6-svc -O . -cd /opt/frigate +echo "[INFO] Starting Frigate..." >&2 + +cd /opt/frigate || echo "[ERROR] Failed to change working directory to /opt/frigate" >&2 # Replace the bash process with the Frigate process, redirecting stderr to stdout exec 2>&1 diff --git a/docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run index f9978b6b2..f7a5a6d0a 100755 --- a/docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +++ b/docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -2,6 +2,10 @@ # shellcheck shell=bash # Start the NGINX service +set -o errexit -o nounset -o pipefail + +echo "[INFO] Starting NGINX..." >&2 + # Replace the bash process with the NGINX process, redirecting stderr to stdout exec 2>&1 exec nginx