diff --git a/pages/do.php b/pages/do.php index 8f3be4a..e635dc4 100644 --- a/pages/do.php +++ b/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'); + } } }