Skip to content

Commit

Permalink
Fix Php stage www pool
Browse files Browse the repository at this point in the history
  • Loading branch information
eppak committed Jun 8, 2020
1 parent c38209e commit b11e2b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Stages/V1804/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Php extends StageBase implements Stage
*/
public function run(Environment $env): bool
{
$www = APP_PANEL_HTTP_PANEL;

$php = $env->get('php');

try {
Expand All @@ -36,14 +34,17 @@ public function run(Environment $env): bool
return false;
}

$pool = $this->replaceTemplate('php-pool.conf')
foreach([ APP_PANEL_HTTP_USER, APP_PANEL_HTTP_PANEL ] as $www) {
$pool = $this->replaceTemplate('php-pool.conf')
->replace("{USER}", $www)
->value();

if (!$this->write("/etc/php/{$php}/fpm/pool.d/{$www}.conf", $pool, 'Cannot write pool configuration')) {
return false;
if (!$this->write("/etc/php/{$php}/fpm/pool.d/{$www}.conf", $pool, 'Cannot write pool configuration')) {
return false;
}
}


if (!$this->restart("php{$php}-fpm")) {
$this->internal = 'Cannot restart service';

Expand Down

0 comments on commit b11e2b8

Please sign in to comment.