Remove hardcoded php version

Replace it at build time instead so it's easier to change
This commit is contained in:
Daniel Berteaud 2017-07-18 11:32:47 +02:00
parent 3168a47f08
commit 861925abb6
6 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ if [ \! -d /var/lib/mysql/$db ]; then
/usr/bin/mysqladmin create $db
/usr/bin/mysql $db < $schema
else
su -s /bin/bash - www -c "cd /usr/share/tt-rss && echo 'yes' | /usr/bin/php71 ./update.php --update-schema"
su -s /bin/bash - www -c "cd /usr/share/tt-rss && echo 'yes' | /usr/bin/php__PHP_VERSION__ ./update.php --update-schema"
fi
/usr/bin/mysql <<EOF

View File

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

View File

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

View File

@ -1,5 +1,5 @@
{
if ($PHP_VERSION eq '71'){
if ($PHP_VERSION eq '__PHP_VERSION__'){
if ((${'tt-rss'}{status} || 'disabled') eq 'enabled'){
my $id = 'tt-rss';
$OUT .=<<_EOF;

View File

@ -16,7 +16,7 @@
define('TMP_DIRECTORY', '/var/lib/php/tt-rss/tmp');
// Directory for temporary files
define('PHP_EXECUTABLE', '/usr/bin/php71');
define('PHP_EXECUTABLE', '/usr/bin/php__PHP_VERSION__');
// Path to PHP executable
define('LOCK_DIRECTORY', '/var/lock/tt-rss');

View File

@ -12,5 +12,5 @@ cd /usr/share/tt-rss
exec \
/usr/local/bin/setuidgid www \
/usr/bin/php71 ./update.php --daemon
/usr/bin/php__PHP_VERSION__ ./update.php --daemon