Changeset 208 for trunk/system/generators/netwatch.php
- Timestamp:
- May 6, 2009, 8:21:23 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/netwatch.php
r197 r208 15 15 $I = explode('.', $Subnet['AddressRange']); 16 16 $I = $I[2]; 17 $DbResult2 = $Database->query('SELECT * FROM hosts WHERE (IP LIKE "192.168.'.$I.'.%") ORDER BYIP');18 while($ Host= $DbResult2->fetch_assoc())17 $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.LocalIP LIKE "192.168.'.$I.'.%") ORDER BY NetworkInterface.LocalIP'); 18 while($Interface = $DbResult2->fetch_assoc()) 19 19 { 20 $Commands[] = '/tool netwatch add host='.$ Host['IP'].' interval=1m comment='.$Host['name'];20 $Commands[] = '/tool netwatch add host='.$Interface['LocalIP'].' interval=1m comment='.$Interface['DeviceName'].'-'.$Interface['Name']; 21 21 } 22 22 }
Note:
See TracChangeset
for help on using the changeset viewer.