Permalink
Browse files

[FIX] auto guess php mod ini directory

Related #52
  • Loading branch information...
hhoechtl committed Oct 9, 2018
1 parent a213172 commit 5b01767fd478c948f68900a95c4dee1c9d56804d
Showing with 380 additions and 96 deletions.
  1. +0 −2 conf/provision.yml
  2. +20 −4 docker/php/alpine-php5/conf/provision/bootstrap.d/11-php-conf.sh
  3. +20 −4 docker/php/alpine-php7/conf/provision/bootstrap.d/11-php-conf.sh
  4. +20 −4 docker/php/centos-7-php56/conf/provision/bootstrap.d/11-php-conf.sh
  5. +20 −4 docker/php/centos-7-php7/conf/provision/bootstrap.d/11-php-conf.sh
  6. +20 −4 docker/php/centos-7/conf/provision/bootstrap.d/11-php-conf.sh
  7. +20 −4 docker/php/debian-7/conf/provision/bootstrap.d/11-php-conf.sh
  8. +0 −3 docker/php/debian-7/conf/provision/bootstrap.d/12-php-mod-conf.sh
  9. +20 −4 docker/php/debian-8-php7/conf/provision/bootstrap.d/11-php-conf.sh
  10. +0 −3 docker/php/debian-8-php7/conf/provision/bootstrap.d/12-php-mod-conf.sh
  11. +20 −4 docker/php/debian-8/conf/provision/bootstrap.d/11-php-conf.sh
  12. +0 −3 docker/php/debian-8/conf/provision/bootstrap.d/12-php-mod-conf.sh
  13. +20 −4 docker/php/debian-9/conf/provision/bootstrap.d/11-php-conf.sh
  14. +0 −3 docker/php/debian-9/conf/provision/bootstrap.d/12-php-mod-conf.sh
  15. +20 −4 docker/php/ubuntu-12.04/conf/provision/bootstrap.d/11-php-conf.sh
  16. +20 −4 docker/php/ubuntu-14.04/conf/provision/bootstrap.d/11-php-conf.sh
  17. +20 −4 docker/php/ubuntu-15.04/conf/provision/bootstrap.d/11-php-conf.sh
  18. +20 −4 docker/php/ubuntu-15.10/conf/provision/bootstrap.d/11-php-conf.sh
  19. +20 −4 docker/php/ubuntu-16.04/conf/provision/bootstrap.d/11-php-conf.sh
  20. +20 −4 docker/php/ubuntu-16.10/conf/provision/bootstrap.d/11-php-conf.sh
  21. +20 −4 docker/php/ubuntu-17.04/conf/provision/bootstrap.d/11-php-conf.sh
  22. +20 −4 docker/php/ubuntu-17.10/conf/provision/bootstrap.d/11-php-conf.sh
  23. +20 −4 docker/php/ubuntu-18.04/conf/provision/bootstrap.d/11-php-conf.sh
  24. +0 −3 provisioning/php/debian-8/provision/bootstrap.d/12-php-mod-conf.sh
  25. +0 −3 provisioning/php/debian-9/provision/bootstrap.d/12-php-mod-conf.sh
  26. +20 −4 provisioning/php/general/provision/bootstrap.d/11-php-conf.sh
View
@@ -41,8 +41,6 @@ provision:
php/general : '(debian|ubuntu|centos|alpine)'
php/ubuntu-12.04 : ubuntu-12.04
php/alpine : alpine
php/debian-8 : '(debian-7|debian-8)'
php/debian-9 : '(debian-8-php7|debian-9)'
php-apache:
configuration:
apache/general : '*'
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0

This file was deleted.

Oops, something went wrong.
@@ -9,7 +9,11 @@ if [[ "$(version-compare "$PHP_VERSION" "5.99.999")" == "<" ]]; then
case "$IMAGE_FAMILY" in
Debian|Ubuntu)
PHP_ETC_DIR=/etc/php5
PHP_MOD_INI_DIR=/etc/php5/conf.d
if [[ -d "/etc/php5/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php5/mods-available
else
PHP_MOD_INI_DIR=/etc/php5/conf.d
fi
PHP_MAIN_CONF=/etc/php5/fpm/php-fpm.conf
PHP_POOL_CONF=www.conf
PHP_POOL_DIR=/etc/php5/fpm/pool.d
@@ -57,19 +61,31 @@ elif [[ "$(version-compare "$PHP_VERSION" "7.99.999")" == "<" ]]; then
Debian|Ubuntu)
if [[ "$(version-compare "$PHP_VERSION" "7.2.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.2
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
if [[ -d "/etc/php/7.2/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.2/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.2/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.2/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.2/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.2
elif [[ "$(version-compare "$PHP_VERSION" "7.1.*")" == "=" ]]; then
PHP_ETC_DIR=/etc/php/7.1
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
if [[ -d "/etc/php/7.1/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.1/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.1/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.1/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.1/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.1
else
PHP_ETC_DIR=/etc/php/7.0
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
if [[ -d "/etc/php/7.0/mods-available" ]]; then
PHP_MOD_INI_DIR=/etc/php/7.0/mods-available
else
PHP_MOD_INI_DIR=/etc/php/7.0/conf.d
fi
PHP_MAIN_CONF=/etc/php/7.0/fpm/php-fpm.conf
PHP_POOL_DIR=/etc/php/7.0/fpm/pool.d
PHP_FPM_BIN=/usr/sbin/php-fpm7.0

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5b01767

Please sign in to comment.