glpi / front / menu.php @ bef4271a
History | View | Annotate | Download (662 Bytes)
1 |
<?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 |
if (!empty($_POST["deploy"])) { |
11 |
$fds = array( |
12 |
1 => array("pipe", "w"), |
13 |
2 => array("pipe", "w"), |
14 |
); |
15 |
$cmd = "/usr/bin/sudo -n /usr/bin/vigiconf deploy -f --debug 2>&1"; |
16 |
$res = proc_open($cmd, $fds, $pipes); |
17 |
if (!is_resource($res)) |
18 |
$res = false; |
19 |
} |
20 |
|
21 |
PluginVigiloMenu::displayMenu($res, $pipes); |
22 |
} else {
|
23 |
Html::displayRightError();
|
24 |
} |
25 |
|
26 |
Html::footer();
|
27 |
|