From bc1ae1cbaa762507f1b5cd7c6c4207eef2cfe44a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Feb 2020 14:32:27 +0100 Subject: [PATCH] if EGW_APC_SHM_SIZE is set in environment, propagate value to apcu.ini --- doc/docker/fpm/entrypoint.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/docker/fpm/entrypoint.sh b/doc/docker/fpm/entrypoint.sh index e10cadb509..2af20757f3 100755 --- a/doc/docker/fpm/entrypoint.sh +++ b/doc/docker/fpm/entrypoint.sh @@ -1,8 +1,16 @@ #!/bin/bash set -e +# if EGW_APC_SHM_SIZE is set in environment, propagate value to apcu.ini +test -n "$EGW_APC_SHM_SIZE" && { + grep "apc.shm_size" /etc/php/7.3/fpm/conf.d/20-apcu.ini >/dev/null && \ + sed -e "s/^;\?apc.shm_size.*/apc.shm_size=$EGW_APC_SHM_SIZE/g" \ + -i /etc/php/7.3/fpm/conf.d/20-apcu.ini || \ + echo "apc.shm_size=$EGW_APC_SHM_SIZE" >> /etc/php/7.3/fpm/conf.d/20-apcu.ini \ +} + # if EGW_SESSION_TIMEOUT is set in environment, propagate value to php.ini -test -n "$EGW_SESSION_TIMEOUT" && test "$EGW_SESSION_TIMEOUT" -ge 1440 && +test -n "$EGW_SESSION_TIMEOUT" && test "$EGW_SESSION_TIMEOUT" -ge 1440 && \ sed -e "s/^;\?session.gc_maxlifetime.*/session.gc_maxlifetime=$EGW_SESSION_TIMEOUT/g" \ -i /etc/php/7.3/fpm/php.ini