Skip to content

Commit

Permalink
Connected devices not shown for uap0. Fixes #312
Browse files Browse the repository at this point in the history
  • Loading branch information
billz committed Apr 13, 2019
1 parent 10c795e commit c07a41f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,13 @@ function DisplayDashboard()
</thead>
<tbody>
<?php
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.RASPI_WIFI_CLIENT_INTERFACE.' | grep -oE "(([0-9]|[a-f]|[A-F]){2}:){5}([0-9]|[a-f]|[A-F]){2}" | tr "\n" "\|" | sed "s/.$//")', $clients);
$arrHostapdConf = parse_ini_file('/etc/raspap/hostapd.ini');
if ($arrHostapdConf['WifiAPEnable'] == 1) {
$client_iface = 'uap0';
} else {
$client_iface = RASPI_WIFI_CLIENT_INTERFACE;
}
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' | grep -oE "(([0-9]|[a-f]|[A-F]){2}:){5}([0-9]|[a-f]|[A-F]){2}" | tr "\n" "\|" | sed "s/.$//")', $clients);
foreach ($clients as $client) {
$client_items = explode(' ', $client);
echo '<tr>'.PHP_EOL;
Expand Down

0 comments on commit c07a41f

Please sign in to comment.