mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +03:00
Set limit if it is too low
This commit is contained in:
parent
81716caf75
commit
8bd9912a3c
@ -11,7 +11,7 @@ current_hard_limit=$(ulimit -Hn)
|
||||
TARGET_SOFT_LIMIT=65536
|
||||
TARGET_HARD_LIMIT=65536
|
||||
|
||||
if [ "$current_soft_limit" -eq 1024 ]; then
|
||||
if [ "$current_soft_limit" -lt "$TARGET_SOFT_LIMIT" ]; then
|
||||
# Attempt to set both soft and hard limits to the new value
|
||||
# This requires sufficient privileges (e.g., running as root in the container)
|
||||
if ulimit -n "$TARGET_SOFT_LIMIT:$TARGET_HARD_LIMIT"; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user