Changeset 111 for system/generators/netwatch.php
- Timestamp:
- Nov 3, 2008, 7:48:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
system/generators/netwatch.php
r103 r111 5 5 //$MaxSubnet = 1; 6 6 $Commands[] = '/tool netwatch remove [/tool netwatch find]'; 7 for($i = 0; $i <= 4; $i++)8 {9 $DbResult = $Database->select('hosts', '*', "IP LIKE '192.168.".$i."%' ORDER BY IP");7 //for($i = 0; $i <= 4; $i++) 8 //{ 9 $DbResult = $Database->select('hosts', '*', 'IP != "" ORDER BY IP'); 10 10 while($Row = $DbResult->fetch_array()) 11 11 { 12 12 $Commands[] = '/tool netwatch add host='.$Row['IP'].' interval=1m comment='.$Row['name']; 13 13 } 14 }14 //} 15 15 $Commands = implode(';', $Commands); 16 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda- 5"'.$Commands.'"';16 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda-0 "'.$Commands.'"'; 17 17 echo($Command); 18 18 exec($Command, $Output);
Note:
See TracChangeset
for help on using the changeset viewer.