Remove hardcoded php version
Replace it at build time instead so it's easier to change
This commit is contained in:
parent
3168a47f08
commit
861925abb6
|
@ -11,7 +11,7 @@ if [ \! -d /var/lib/mysql/$db ]; then
|
||||||
/usr/bin/mysqladmin create $db
|
/usr/bin/mysqladmin create $db
|
||||||
/usr/bin/mysql $db < $schema
|
/usr/bin/mysql $db < $schema
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
/usr/bin/mysql <<EOF
|
/usr/bin/mysql <<EOF
|
||||||
|
|
|
@ -3,7 +3,7 @@ if ($fastcgi_mod eq 'mod_fastcgi'){
|
||||||
$OUT .=<<_EOF;
|
$OUT .=<<_EOF;
|
||||||
Action phptt-rss-fastcgi /php-cgi-bin/phptt-rss-wrapper
|
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
|
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
|
_EOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ _EOF
|
||||||
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
|
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
|
||||||
$php =<<'_EOF';
|
$php =<<'_EOF';
|
||||||
<FilesMatch \.php$>
|
<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>
|
</FilesMatch>
|
||||||
_EOF
|
_EOF
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
if ($PHP_VERSION eq '71'){
|
if ($PHP_VERSION eq '__PHP_VERSION__'){
|
||||||
if ((${'tt-rss'}{status} || 'disabled') eq 'enabled'){
|
if ((${'tt-rss'}{status} || 'disabled') eq 'enabled'){
|
||||||
my $id = 'tt-rss';
|
my $id = 'tt-rss';
|
||||||
$OUT .=<<_EOF;
|
$OUT .=<<_EOF;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
define('TMP_DIRECTORY', '/var/lib/php/tt-rss/tmp');
|
define('TMP_DIRECTORY', '/var/lib/php/tt-rss/tmp');
|
||||||
// Directory for temporary files
|
// Directory for temporary files
|
||||||
|
|
||||||
define('PHP_EXECUTABLE', '/usr/bin/php71');
|
define('PHP_EXECUTABLE', '/usr/bin/php__PHP_VERSION__');
|
||||||
// Path to PHP executable
|
// Path to PHP executable
|
||||||
|
|
||||||
define('LOCK_DIRECTORY', '/var/lock/tt-rss');
|
define('LOCK_DIRECTORY', '/var/lock/tt-rss');
|
||||||
|
|
|
@ -12,5 +12,5 @@ cd /usr/share/tt-rss
|
||||||
|
|
||||||
exec \
|
exec \
|
||||||
/usr/local/bin/setuidgid www \
|
/usr/local/bin/setuidgid www \
|
||||||
/usr/bin/php71 ./update.php --daemon
|
/usr/bin/php__PHP_VERSION__ ./update.php --daemon
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user