wesmiler пре 2 година
родитељ
комит
f5be273ca1
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      app/Console/Commands/SocketServer.php

+ 3 - 3
app/Console/Commands/SocketServer.php

@@ -362,9 +362,9 @@ class SocketServer extends Command
     {
         if ($this->ws) {
             // 直接杀
-            $port = env('SOCKET_PORT', '6530');
-            if(function_exists('exec')){
-                exec('pid=$(lsof -F p  -i:'.$port.' | cut -b 2-) &&  pkill -9 $pid');
+            $stoSh = base_path().'/crontab/socketStop.sh';
+            if(file_exists($stoSh) && function_exists('exec')){
+                exec("{$stoSh}");
             }
 
             echo "socket stop...\n";