Ignore:
Timestamp:
Nov 3, 2008, 7:48:12 PM (16 years ago)
Author:
george
Message:
  • Upraveno: GenerovacĂ­ skripty.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • system/generators/netwatch.php

    r103 r111  
    55//$MaxSubnet = 1;
    66$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');
    1010  while($Row = $DbResult->fetch_array())
    1111  {
    1212    $Commands[] = '/tool netwatch add host='.$Row['IP'].' interval=1m comment='.$Row['name'];
    1313  }
    14 }
     14//}
    1515$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.'"';
    1717echo($Command);
    1818exec($Command, $Output);
Note: See TracChangeset for help on using the changeset viewer.