-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added scanoptions.php; Regenerated package.xml.
- Loading branch information
Showing
13 changed files
with
277 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule wiki
updated
from fc21ec to 5025c7
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
use PEAR2\Net\RouterOS; | ||
require_once 'PEAR2/Autoload.php'; | ||
|
||
$util = new RouterOS\Util( | ||
$client = new RouterOS\Client('192.168.88.1', 'admin', 'password') | ||
); | ||
$util->setMenu('/system scheduler')->add( | ||
array( | ||
'name' => 'logger', | ||
'interval' => '1m', | ||
'on-event' => RouterOS\Script::prepare( | ||
'/log info $phpver', | ||
array( | ||
'phpver' => phpversion() | ||
) | ||
) | ||
) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
use PEAR2\Net\RouterOS; | ||
|
||
require_once 'PEAR2/Autoload.php'; | ||
|
||
$util = new RouterOS\Util( | ||
$client = new RouterOS\Client('192.168.88.1', 'admin', 'password') | ||
); | ||
$util->setMenu('/ip arp'); | ||
$util->edit(0, 'address', '192.168.88.103'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/** | ||
* File scanoptions.php for PEAR2_Net_RouterOS. | ||
* | ||
* PHP version 5.3 | ||
* | ||
* @category Net | ||
* @package PEAR2_Net_RouterOS | ||
* @author Vasil Rangelov <boen.robot@gmail.com> | ||
* @copyright 2011 Vasil Rangelov | ||
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 | ||
* @version GIT: $Id$ | ||
* @link http://pear2.php.net/PEAR2_Net_RouterOS | ||
*/ | ||
|
||
$scanoptions = array( | ||
'ignore' => array() | ||
); | ||
$oldCwd = getcwd(); | ||
chdir(__DIR__); | ||
foreach (new RecursiveIteratorIterator( | ||
new RecursiveDirectoryIterator( | ||
'.', | ||
RecursiveDirectoryIterator::UNIX_PATHS | ||
| RecursiveDirectoryIterator::SKIP_DOTS | ||
), | ||
RecursiveIteratorIterator::LEAVES_ONLY | ||
) as $path) { | ||
if ('.git' === $path->getFilename()) { | ||
$scanoptions['ignore'][$path->getRealPath()] | ||
= $path->isDir() ? 'dir' : 'file'; | ||
} | ||
} | ||
chdir($oldCwd); | ||
return $scanoptions; |
Oops, something went wrong.