glpi / front / menu.php @ 0e0753c8
History | View | Annotate | Download (665 Bytes)
1 | efcf5ecf | Francois POIROTTE | <?php
|
---|---|---|---|
2 | |||
3 | include ("../../../inc/includes.php"); |
||
4 | |||
5 | if (PluginVigiloMenu::canView()) { |
||
6 | Html::header(__('Vigilo', 'vigilo'), $_SERVER["PHP_SELF"], "plugins", |
||
7 | "PluginVigiloMenu", "menu"); |
||
8 | |||
9 | $res = null; |
||
10 | 0e0753c8 | Romain CHOLLET | $pipes = array(); |
11 | |||
12 | efcf5ecf | Francois POIROTTE | if (!empty($_POST["deploy"])) { |
13 | $fds = array( |
||
14 | 1 => array("pipe", "w"), |
||
15 | 2 => array("pipe", "w"), |
||
16 | ); |
||
17 | 0e0753c8 | Romain CHOLLET | $cmd = "/usr/bin/sudo -n /usr/bin/vigiconf deploy -f --debug"; |
18 | efcf5ecf | Francois POIROTTE | $res = proc_open($cmd, $fds, $pipes); |
19 | if (!is_resource($res)) |
||
20 | 0e0753c8 | Romain CHOLLET | $res = false; |
21 | efcf5ecf | Francois POIROTTE | } |
22 | PluginVigiloMenu::displayMenu($res, $pipes); |
||
23 | } else {
|
||
24 | Html::displayRightError();
|
||
25 | } |
||
26 | |||
27 | Html::footer();
|