From 73615c326bdf8c377428781449225de16b449de2 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 5 Jul 2017 22:43:57 +0200 Subject: [PATCH] Support empty $PHP_VERSION for default php-fpm service --- root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header index d66024e..b707016 100644 --- a/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header +++ b/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default00Header @@ -1,7 +1,8 @@ { use esmith::ConfigDB; my $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n"; -my $php = $c->get( 'php' . $PHP_VERSION . '-php-fpm' ); +my $srv = ( $PHP_VERSION ne '') ? 'php' . $PHP_VERSION . '-php-fpm' : 'php-fpm'; +my $php = $c->get( $srv ); if ($php){ $MemoryLimit = $php->prop('MemoryLimit') || '128M'; $MaxExecutionTime = $php->prop('MaxExecutionTime') || '30';