diff --git a/src/Controllers/AgentController.php b/src/Controllers/AgentController.php index 7e9060b..3fc99b8 100755 --- a/src/Controllers/AgentController.php +++ b/src/Controllers/AgentController.php @@ -543,10 +543,10 @@ systemctl status server-monitor-agent $script = implode("\n", $lines) . "\n"; + $response->getBody()->write($script); return $response ->withHeader('Content-Type', 'text/plain; charset=UTF-8') - ->withHeader('Content-Disposition', 'attachment; filename="install.ps1"') - ->withBody(\Nyholm\Psr7\Utils::streamFor($script)); + ->withHeader('Content-Disposition', 'attachment; filename="install.ps1"'); } }