Files
2026-10-31 19:29:48 +01:00

9 lines
357 B
Bash

#!/bin/sh
for ini in "${PHP_INI_DIR}"/conf.d/*opcache.ini; do
if [ "$(echo "$APP_DEBUG" | tr '[:upper:]' '[:lower:]')" = "false" ]; then
sed -ri -e "s!opcache.validate_timestamps=.*!opcache.validate_timestamps=${PHP_OPCACHE_VALIDATE_TIMESTAMPS:-1}!g" "$ini"
else
sed -ri -e 's!opcache.enable=1!opcache.enable=0!g' "$ini"
fi
done