From 643b19194dbd285df3331a6ca1a6d5d59de77737 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 18 Jul 2017 10:08:14 +0200 Subject: [PATCH] Dont put PHP version in the code Instead, replace it at build time so it's easy to change --- .../etc/httpd/conf/httpd.conf/68FastCGIConfig20Dokuwiki | 2 +- root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dokuwiki | 2 +- root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Dokuwiki | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig20Dokuwiki b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig20Dokuwiki index 87f11bd..2ff7523 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig20Dokuwiki +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig20Dokuwiki @@ -3,7 +3,7 @@ if ($fastcgi_mod eq 'mod_fastcgi'){ $OUT .=<<_EOF; Action phpdokuwiki-fastcgi /php-cgi-bin/phpdokuwiki-wrapper Alias /php-cgi-bin/phpdokuwiki-wrapper /var/www/php-cgi-bin/phpdokuwiki-wrapper -FastCgiExternalServer /var/www/php-cgi-bin/phpdokuwiki-wrapper -socket /var/run/php-fpm/php71-dokuwiki.sock -pass-header Authorization -idle-timeout 120 +FastCgiExternalServer /var/www/php-cgi-bin/phpdokuwiki-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock -pass-header Authorization -idle-timeout 120 _EOF } } diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dokuwiki b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dokuwiki index b04cbf5..9b8ce8a 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dokuwiki +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dokuwiki @@ -26,7 +26,7 @@ _EOF elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){ $php =<<_EOF; - SetHandler "proxy:unix:/var/run/php-fpm/php71-dokuwiki.sock|fcgi://localhost" + SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-dokuwiki.sock|fcgi://localhost" _EOF } diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Dokuwiki b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Dokuwiki index a869c2d..96cf473 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Dokuwiki +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Dokuwiki @@ -1,6 +1,6 @@ { -if ($PHP_VERSION eq '71'){ +if ($PHP_VERSION eq '__PHP_VERSION__'){ if (($dokuwiki{'status'} || 'disabled') eq 'enabled'){ my $max_upload_size = ($dokuwiki{MaxUploadSize} || '20') . 'M'; my $id = 'dokuwiki';