Ignore:
Timestamp:
May 10, 2009, 12:30:09 PM (16 years ago)
Author:
george
Message:

Opraveno: Skripty pro generování nastavení směrovačů.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/netwatch.php

    r208 r213  
    77while($Router = $DbResult3->fetch_assoc())
    88{
     9  echo($Router['DHCP']."\n");
    910  $Commands = array();
    1011  $Commands[] = '/tool netwatch remove [find]';
     
    1819    while($Interface = $DbResult2->fetch_assoc())
    1920    {
    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;
    2124    }
    2225  }
    2326  $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.'"';
    2528  //echo($Command."\n");
    2629  $Output = '';
Note: See TracChangeset for help on using the changeset viewer.