mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-16 02:23:02 +03:00
feat: native support for rootless container execution
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user