mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 08:49:47 -05:00
Docker: added pause/resume commands & container console window
This commit is contained in:
@@ -92,9 +92,10 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
case 'terminal':
|
||||
exec("kill \$(pgrep -a ttyd|awk '/\/$name\.sock/{print \$1}') 2>/dev/null");
|
||||
$pid = exec("pgrep -a ttyd|awk '/\\/$name\\.sock/{print \$1}'");
|
||||
if ($pid) exec("kill $pid");
|
||||
@unlink("/var/tmp/$name.sock");
|
||||
exec("exec ttyd -d 0 -i '/var/tmp/$name.sock' docker exec -it '$name' sh &>/dev/null &");
|
||||
exec("exec ttyd -o -d0 -i '/var/tmp/$name.sock' docker exec -it '$name' sh &>/dev/null &");
|
||||
break;
|
||||
default:
|
||||
$arrResponse = ['error' => "Unknown action '$action'"];
|
||||
|
||||
Reference in New Issue
Block a user