This commit is contained in:
Nicolas Mowen 2024-05-30 09:35:44 -06:00
parent dfd0649335
commit b6ee80853c

View File

@ -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
}