Changeset 213 for trunk/system/generators/netwatch.php
- Timestamp:
- May 10, 2009, 12:30:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/netwatch.php
r208 r213 7 7 while($Router = $DbResult3->fetch_assoc()) 8 8 { 9 echo($Router['DHCP']."\n"); 9 10 $Commands = array(); 10 11 $Commands[] = '/tool netwatch remove [find]'; … … 18 19 while($Interface = $DbResult2->fetch_assoc()) 19 20 { 20 $Commands[] = '/tool netwatch add host='.$Interface['LocalIP'].' interval=1m comment='.$Interface['DeviceName'].'-'.$Interface['Name']; 21 $Name = $Interface['DeviceName']; 22 if($Interface['Name'] != '') $Name .= '-'.$Interface['Name']; 23 $Commands[] = '/tool netwatch add host='.$Interface['LocalIP'].' interval=1m comment='.$Name; 21 24 } 22 25 } 23 26 $Commands = implode(';', $Commands); 24 $Command = '/usr/bin/ssh - l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Router['DHCP'].' "'.$Commands.'"';27 $Command = '/usr/bin/ssh -o ConnectTimeout='.$Config['MainRouter']['ConnectTimeout'].' -l '.$Config['MainRouter']['UserName'].' -i id_dsa '.$Router['DHCP'].' "'.$Commands.'"'; 25 28 //echo($Command."\n"); 26 29 $Output = '';
Note:
See TracChangeset
for help on using the changeset viewer.