Remove hardcoded php version from the code

Replace it at build time so it's easy to change
tags/smeserver-dl-0.2.1-1
Daniel Berteaud 8 years ago
parent 9d8dcb147c
commit f9da9e670f
  1. 2
      root/etc/e-smith/templates/etc/e-smith/sql/init/dl
  2. 2
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig15Dl
  3. 2
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl

@ -11,7 +11,7 @@ if [ ! -d /var/lib/mysql/$db ]; then
/usr/bin/mysql -e 'create database $db' /usr/bin/mysql -e 'create database $db'
/usr/bin/mysql $db < $dbstruct /usr/bin/mysql $db < $dbstruct
else else
su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php56 ./dbupgrade.php" su -s /bin/bash - www -c "cd /usr/share/dl/include/scripts && /usr/bin/php__PHP_VERSION__ ./dbupgrade.php"
fi fi
/usr/bin/mysql <<EOF /usr/bin/mysql <<EOF

@ -3,7 +3,7 @@ if ($fastcgi_mod eq 'mod_fastcgi'){
$OUT .=<<_EOF; $OUT .=<<_EOF;
Action phpdl-fastcgi /php-cgi-bin/phpdl-wrapper Action phpdl-fastcgi /php-cgi-bin/phpdl-wrapper
Alias /php-cgi-bin/phpdl-wrapper /var/www/php-cgi-bin/phpdl-wrapper Alias /php-cgi-bin/phpdl-wrapper /var/www/php-cgi-bin/phpdl-wrapper
FastCgiExternalServer /var/www/php-cgi-bin/phpdl-wrapper -socket /var/run/php-fpm/php56-dl.sock -pass-header Authorization -idle-timeout 120 FastCgiExternalServer /var/www/php-cgi-bin/phpdl-wrapper -socket /var/run/php-fpm/php__PHP_VERSION__-dl.sock -pass-header Authorization -idle-timeout 120
_EOF _EOF
} }
} }

@ -43,7 +43,7 @@ _EOF
elsif ($fascgi_mod eq 'mod_proxy_fcgi'){ elsif ($fascgi_mod eq 'mod_proxy_fcgi'){
$php =<<'_EOF'; $php =<<'_EOF';
<FilesMatch \.php$> <FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm/php56-dl.sock|fcgi://localhost" SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-dl.sock|fcgi://localhost"
</FilesMatch> </FilesMatch>
_EOF _EOF
} }

Loading…
Cancel
Save