Skip to content

Commit 44049e7

Browse files
authored
Add the DISABLE_IPV6 option in php-fpm (#402)
Copy the same DISABLE_IPV6 option present in the nginx script to php-fpm to allow the service to start when IPv6 is disable in the kernel
1 parent a4e7a00 commit 44049e7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

core/files/entrypoint_fpm.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@ change_php_vars() {
8383
sed -i -E "s/^pm.status_listen =/;pm.status_listen =/" "$FILE"
8484
fi
8585
if [[ -n "$PHP_LISTEN_FPM" ]]; then
86-
echo "Configure PHP | Setting 'listen' to [::]:9002"
87-
sed -i "/^listen =/s@=.*@= [::]:9002@" "$FILE"
86+
if [[ "$DISABLE_IPV6" = "true" ]]; then
87+
echo "Configure PHP | Setting 'listen' to 0.0.0.0:9002"
88+
sed -i "/^listen =/s@=.*@= 0.0.0.0:9002@" "$FILE"
89+
else
90+
echo "Configure PHP | Setting 'listen' to [::]:9002"
91+
sed -i "/^listen =/s@=.*@= [::]:9002@" "$FILE"
92+
fi
8893
fi
8994

9095
done

0 commit comments

Comments
 (0)