From 8179278bfa05fef9d3bf76c97e90f0fafe20d129 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 1 Jun 2024 05:19:54 -0600 Subject: [PATCH] Don't fail if user has bind mounted nginx config (#11671) --- docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run index 0d237f432..c6292937d 100755 --- a/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run +++ b/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -16,7 +16,8 @@ function set_worker_processes() { proc_count=4; fi - sed -i "s/worker_processes auto;/worker_processes ${proc_count};/" /usr/local/nginx/conf/nginx.conf + # we need to catch any errors because sed will fail if user has bind mounted a custom nginx file + sed -i "s/worker_processes auto;/worker_processes ${proc_count};/" /usr/local/nginx/conf/nginx.conf || true } set_worker_processes