From 9e0b841ffe5f34ec024c59983476ebf3578fa10c Mon Sep 17 00:00:00 2001 From: casjay Date: Wed, 29 Jan 2025 14:03:32 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/zz-nginx.sh --- rootfs/usr/local/etc/docker/init.d/zz-nginx.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh index 0d88263..c24bc40 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh @@ -192,8 +192,11 @@ __execute_prerun() { # Define environment local hostname=${HOSTNAME} local php_ver="${PHP_VERSION:-84}" + local php_fpm_bin="$(type -P php-fpm || type -P php-fpm$$php_ver || false)" # Define actions/commands - /usr/sbin/php-fpm$php_ver --nodaemonize --fpm-config "/etc/php$php_ver/php-fpm.conf" & + if [ -n "$php_fpm_bin" ]; then + $php_fpm_bin --nodaemonize --fpm-config "/etc/php$php_ver/php-fpm.conf" & + fi # allow custom functions if builtin type -t __execute_prerun_local | grep -q 'function'; then __execute_prerun_local; fi }