mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
Fix bash
This commit is contained in:
parent
dfd0649335
commit
b6ee80853c
@ -10,11 +10,11 @@ echo "[INFO] Starting NGINX..."
|
||||
|
||||
function set_worker_processes() {
|
||||
# Capture number of assigned CPUs to calculate worker processes
|
||||
local proc_count = $(nproc --all)
|
||||
local proc_count
|
||||
|
||||
if (proc_count > 4) {
|
||||
proc_count = 4;
|
||||
}
|
||||
if proc_count=$(nproc --all) && [[ $proc_count -gt 4 ]]; then
|
||||
proc_count=4;
|
||||
fi
|
||||
|
||||
sed -i "" "s/worker_processes auto;/worker_processes ${proc_count};/" /usr/local/nginx/conf/nginx.conf
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user