Ignore:
Timestamp:
Sep 8, 2009, 9:03:14 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Import položek Netwatch z routerboardu do datbáze.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/routerboard.php

    r242 r248  
    1010  var $PrivateKey = 'id_dsa';
    1111  var $MaxBurstLineCount = 100;
    12  
     12  var $Debug = false;
     13
    1314  function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '')
    1415  {
     
    5253      $Commands = str_replace('$', '\$', $Commands);
    5354      $Command = $this->SSHPath.' -o ConnectTimeout='.$this->Timeout.' -l '.$this->UserName.' -i '.$this->PrivateKey.' '.$this->HostName.' "'.$Commands.'"';
    54       echo($Command);
     55      if($this->Debug) echo($Command);
    5556      exec($Command, $Output);
    5657    } else $Output = '';
    57     print_r($Output);
     58    if($this->Debug) print_r($Output);
    5859    return($Output);
    5960  }
     
    235236      }
    236237    }
    237     print_r($Commands);
     238    if($this->Debug) print_r($Commands);
    238239    return($this->Execute($Commands));   
    239240  }
Note: See TracChangeset for help on using the changeset viewer.