Last change
on this file since 13666 was 13666, checked in by tbretz, 13 years ago |
Added first draft of an interfact to the dimctrl.
|
File size:
519 bytes
|
Line | |
---|
1 | <?PHP
|
---|
2 |
|
---|
3 | require_once("config.php");
|
---|
4 |
|
---|
5 | if (!isset($_GET['start']) && !isset($_GET['stop']))
|
---|
6 | return header('HTTP/1.0 400 Command not supported');
|
---|
7 |
|
---|
8 | $out = array();
|
---|
9 |
|
---|
10 | if (isset($_GET['stop']))
|
---|
11 | $str = exec($path."/dimctrl --stop", $out, $rc);
|
---|
12 |
|
---|
13 | if (isset($_GET['start']))
|
---|
14 | $str = exec($path."/dimctrl --start '".$_GET['start']."'", $out, $rc);
|
---|
15 |
|
---|
16 | if ($rc!=1 && $rc!=2)
|
---|
17 | return header('HTTP/1.0 500 Execution failed [rc='.$rc."]");
|
---|
18 |
|
---|
19 | print($rc);
|
---|
20 |
|
---|
21 | if (isset($_GET['debug']))
|
---|
22 | {
|
---|
23 | print("\n");
|
---|
24 | print_r($out);
|
---|
25 | }
|
---|
26 |
|
---|
27 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.