check if command is emptry
This commit is contained in:
parent
2000f98b70
commit
445ba5e7ae
10
pages/do.php
10
pages/do.php
|
@ -36,9 +36,13 @@ if(isset($_SESSION['LOGIN']))
|
|||
{
|
||||
$filename = "/tmp/command".time().".txt";
|
||||
$command = trim($_REQUEST['commandtext']);
|
||||
file_put_contents($filename, $command);
|
||||
|
||||
exec('cat '.$filename.' | socat EXEC:"docker attach '.$container['Id'].'",pty STDIN');
|
||||
|
||||
if($command != "")
|
||||
{
|
||||
file_put_contents($filename, $command);
|
||||
|
||||
exec('cat '.$filename.' | socat EXEC:"docker attach '.$container['Id'].'",pty STDIN');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue