mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-07 05:55:27 +03:00
18 lines
346 B
Plaintext
18 lines
346 B
Plaintext
|
|
#!/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
|