frigate/docker/main/rootfs/usr/local/bin/logutil
2026-05-02 09:14:18 +10:00

18 lines
346 B
Plaintext
Executable File

#!/command/with-contenv bash
# shellcheck shell=bash
LOG_DIR=$1
if [ -z "$LOG_DIR" ]; then
echo "Usage: $0 <log-dir>"
exit 1
fi
CMD=(s6-log -b -- ${S6_LOGGING_SCRIPT:-n20 s1000000 T} "$LOG_DIR")
if [ "$(id -u)" = "0" ]; then
exec /command/s6-envuidgid nobody /command/s6-applyuidgid -U -- "${CMD[@]}"
else
exec "${CMD[@]}"
fi