Last change
on this file since 161 was 161, checked in by george, 16 years ago |
- Přesunuto: SQL aktualizační soubory ze složky sql do složky www/sql.
- Přesunuto: Systémové skripty do složky www/system.
|
-
Property svn:executable
set to
*
|
File size:
580 bytes
|
Line | |
---|
1 | <?php
|
---|
2 | include_once('../../global.php');
|
---|
3 |
|
---|
4 | $Commands = array();
|
---|
5 | //$MaxSubnet = 1;
|
---|
6 | $Commands[] = '/tool netwatch remove [/tool netwatch find]';
|
---|
7 | //for($i = 0; $i <= 4; $i++)
|
---|
8 | //{
|
---|
9 | $DbResult = $Database->select('hosts', '*', 'IP != "" ORDER BY IP');
|
---|
10 | while($Row = $DbResult->fetch_array())
|
---|
11 | {
|
---|
12 | $Commands[] = '/tool netwatch add host='.$Row['IP'].' interval=1m comment='.$Row['name'];
|
---|
13 | }
|
---|
14 | //}
|
---|
15 | $Commands = implode(';', $Commands);
|
---|
16 | $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda-0 "'.$Commands.'"';
|
---|
17 | echo($Command);
|
---|
18 | exec($Command, $Output);
|
---|
19 | print_r($Output);
|
---|
20 |
|
---|
21 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.