This commit is contained in:
2021-08-12 15:41:50 +08:00
parent b9ab9a869d
commit 37fc82d7e1
+1 -1
View File
@@ -309,7 +309,7 @@ class ServerManager
private function portIsAlready($port): bool|string
{
if (!Kiri::getPlatform()->isLinux()) {
exec('lsof -i :' . $port . ' | grep -i "LISTEN" | awk "{print $2}"', $output);
exec("lsof -i :" . $port . " | grep -i 'LISTEN' | awk '{print $2}'", $output);
if (empty($output)) return false;
$output = explode(PHP_EOL, $output[0]);
return $output[0];