debug
This commit is contained in:
@ -17,7 +17,7 @@ $command = "sudo nmap -n -sP 192.168.1.*"; //need to configure /etc/sudo/sudoer
|
||||
|
||||
echo "presenceDaemon is starting\n";
|
||||
// init du tableau des présences à -1
|
||||
foreach($macAddresses as $nom => $mac)
|
||||
foreach($macAddresses as $mac => $nom)
|
||||
{
|
||||
$presence[$nom] = -1;
|
||||
}
|
||||
@ -46,6 +46,7 @@ while (1)
|
||||
echo $nom . " est modifié dans tableau\n";
|
||||
}
|
||||
}
|
||||
$result = array();
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
@ -53,7 +54,7 @@ function search($string)
|
||||
{
|
||||
global $macAddresses, $presenceTemp;
|
||||
//echo "searching in " . $string . EOL;
|
||||
foreach ($macAddresses as $nom => $needle)
|
||||
foreach ($macAddresses as $needle => $nom)
|
||||
{
|
||||
//echo $nom ." => " . $needle . EOL;
|
||||
if (str_contains($string, $needle))
|
||||
|
Reference in New Issue
Block a user