mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
fixed errors
This commit is contained in:
parent
8645b01828
commit
42fc81a408
@ -676,6 +676,13 @@ class Diagnostics extends Wizard
|
|||||||
$cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l';
|
$cpuProcessor = 'cat /proc/cpuinfo | grep "processor" | wc -l';
|
||||||
$ramMemTotal = 'cat /proc/meminfo | grep "MemTotal"';
|
$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 = [
|
$result = [
|
||||||
'error' => false,
|
'error' => false,
|
||||||
'data' => [
|
'data' => [
|
||||||
@ -697,9 +704,7 @@ class Diagnostics extends Wizard
|
|||||||
],
|
],
|
||||||
'ipInfo' => [
|
'ipInfo' => [
|
||||||
'name' => __('Ip'),
|
'name' => __('Ip'),
|
||||||
'value' => exec(
|
'value' => $ips,
|
||||||
"/sbin/ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}'"
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user