forked from root/threadr.lostcave.ddnss.de
if the output is not being redirected, read stderr as well
parent
f242fba5c1
commit
94d4de68ef
|
@ -46,6 +46,10 @@ echo "Done.";
|
||||||
//run status command list otherwise
|
//run status command list otherwise
|
||||||
foreach ($status_commands as $command) {
|
foreach ($status_commands as $command) {
|
||||||
if ($command != ""){
|
if ($command != ""){
|
||||||
|
// === is here on purpose.
|
||||||
|
if (strpos($command, '>') === false) {
|
||||||
|
$command = $command . " 2>&1";
|
||||||
|
}
|
||||||
$output = shell_exec($command);
|
$output = shell_exec($command);
|
||||||
echo "<pre class=\"commandLine\"> $command </pre>\n<pre class=\"commandLine\"> $output </pre>\n<hr />";
|
echo "<pre class=\"commandLine\"> $command </pre>\n<pre class=\"commandLine\"> $output </pre>\n<hr />";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue