From 861925abb67bee91ac99fd9e6d67f847e0a833f1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 18 Jul 2017 11:32:47 +0200 Subject: [PATCH] Remove hardcoded php version Replace it at build time instead so it's easier to change --- root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss | 2 +- .../e-smith/templates/etc/httpd/conf/httpd.conf/68FastCGIConfig10ttrss | 2 +- root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90tt-rss | 2 +- root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss | 2 +- root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories | 2 +- root/var/service/tt-rss/run | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss b/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss index a8e716a..f999011 100644 --- a/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/tt-rss/80tt-rss @@ -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 < - 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" _EOF } diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss index 4befec1..2162f52 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss @@ -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; diff --git a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories index 85c0abd..9ffa58a 100644 --- a/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories +++ b/root/etc/e-smith/templates/usr/share/tt-rss/config.php/15directories @@ -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'); diff --git a/root/var/service/tt-rss/run b/root/var/service/tt-rss/run index dfceef6..d602242 100644 --- a/root/var/service/tt-rss/run +++ b/root/var/service/tt-rss/run @@ -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