Merge pull request #1570 from ich777/unraidwold_bugfix

Small bugfixes for unraidwold
This commit is contained in:
tom mortensen
2024-01-03 21:35:36 -08:00
committed by GitHub
+5 -4
View File
@@ -18,7 +18,7 @@ function getContainerStats($container, $option) {
}
}
$mac = $argv[1];
$mac = strtolower($argv[1]);
$libvirtd_running = is_file('/var/run/libvirt/libvirtd.pid') ;
$dockerd_running = is_file('/var/run/dockerd.pid');
@@ -88,6 +88,7 @@ foreach($arrEntries as $type => $detail)
{
foreach($entryDetail['interfaces'] as $interfaces)
{
$interfaces['mac'] = strtolower($interfaces['mac']);
if($interfaces['mac'] == "" && $entryDetail['user_mac'] == "None Defined") continue;
if (isset($entryDetail['state'])) $state = $entryDetail['state']; else $state = "";
if (isset($entryDetail['enable']) && !$entryDetail['enable'] ) $enable = false; else $enable = true;
@@ -117,7 +118,7 @@ foreach($arrEntries as $type => $detail)
if ($found && $mac_list[$mac]['enable'] == "enable") {
echo _("Found "). $mac . " ".$mac_list[$mac]['type']." ".$mac_list[$mac]['name'];
echo _("Found"). " " . $mac . " " .$mac_list[$mac]['type'] . " " . $mac_list[$mac]['name'];
switch ($mac_list[$mac]['type']) {
case "VM":
@@ -168,7 +169,7 @@ if ($found && $mac_list[$mac]['enable'] == "enable") {
}
} else {
if ($mac_list[$mac]['enable'] == "disable") echo $mac . " " . _(" has not been actioned as set to disabled");
else echo _("Not Found ")." ". $mac . " "._(" ignoring or Maybe actions disabled for type(Docker/VM/LXC)");
else echo _("Not Found"). " " . $mac . " " . _("ignoring or Maybe actions disabled for type(Docker/VM/LXC)");
}
?>
?>