From 42fc81a4083891542431e6520c80089d33a1a8df Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 13 Nov 2019 17:50:22 +0100 Subject: [PATCH] fixed errors --- pandora_console/include/class/Diagnostics.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index ff34d8a6c6..3a7c623b77 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -676,6 +676,13 @@ class Diagnostics extends Wizard $cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l'; $ramMemTotal = 'cat /proc/meminfo | grep "MemTotal"'; + exec( + "ifconfig | awk '{ print $2}' | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'", + $output + ); + + $ips = implode(', ', $output); + $result = [ 'error' => false, 'data' => [ @@ -697,9 +704,7 @@ class Diagnostics extends Wizard ], 'ipInfo' => [ 'name' => __('Ip'), - 'value' => exec( - "/sbin/ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}'" - ), + 'value' => $ips, ], ], ];