Remove hardcoded php version

Replace it at build time instead so it's easier to change
master
Daniel Berteaud 8 years ago
parent 3168a47f08
commit 861925abb6
  1. 2
      root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss
  2. 2
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig10ttrss
  3. 2
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss
  4. 2
      root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss
  5. 2
      root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories
  6. 2
      root/var/service/tt-rss/run

@ -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

@ -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
}
}

@ -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
}

@ -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;

@ -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');

@ -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

Loading…
Cancel
Save