Update after-install.sh

Make check for worker_rlimit_nofile silent
This commit is contained in:
Fred Dixon 2022-03-27 09:09:52 -04:00 committed by GitHub
parent 22524eaaba
commit 08c6ad67fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ fi
sed -i 's/worker_connections 768/worker_connections 4000/g' /etc/nginx/nginx.conf
if grep "worker_rlimit_nofile" /etc/nginx/nginx.conf; then
if grep -q "worker_rlimit_nofile" /etc/nginx/nginx.conf; then
num=$(grep worker_rlimit_nofile /etc/nginx/nginx.conf | grep -o '[0-9]*')
if [[ "$num" -lt 10000 ]]; then
sed -i 's/worker_rlimit_nofile [0-9 ]*;/worker_rlimit_nofile 10000;/g' /etc/nginx/nginx.conf