Skip to content

Commit

Permalink
opcache.ini.sh: Fix template populating /data/... during docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias K <[email protected]>
  • Loading branch information
theCalcaholic committed Jan 7, 2023
1 parent a1ef381 commit fb76654
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions etc/ncp-templates/php/opcache.ini.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ then
TMP_DIR="/tmp"
elif is_docker
then
DATADIR="$(get_nc_config_value datadirectory || echo '/data/ncdata/data')"
DATADIR="/data-ro/ncdata/data"
[[ "$DOCKERBUILD" == 1 ]] || DATADIR="$(get_nc_config_value datadirectory || echo '/data/ncdata/data')"
TMP_DIR="$DATADIR/.opcache"
else
TMP_DIR="$(source "${BINDIR}/CONFIG/nc-datadir.sh"; tmpl_opcache_dir)"
fi

mkdir -p "$TMP_DIR"

cat <<EOF
zend_extension=opcache.so
opcache.enable=1
Expand Down

0 comments on commit fb76654

Please sign in to comment.