zhaoyang 1 rok pred
rodič
commit
35773baf4e
1 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 4 0
      app/Libs/Helpers.php

+ 4 - 0
app/Libs/Helpers.php

@@ -305,6 +305,10 @@ function dingTalkAlertException(\Throwable $exception)
         $ip = isset($ssh_list[2]) ? $ssh_list[2]:'';
     }
 
+    if(!$ip){
+        $ip = trim( shell_exec("  eth0 |grep 'inet ' 2>/dev/null  |awk '{print $2}' ") );
+    }
+
     $result = [
         'message'=>$exception->getMessage(),
         'class_name'=>$class_name,