Merge remote-tracking branch 'upstream/master' into Snapshots

This commit is contained in:
SimonFair
2023-08-04 08:28:35 +01:00
57 changed files with 4853 additions and 1491 deletions

View File

@@ -1986,6 +1986,20 @@
return $var;
}
function domain_get_vnc_password($domain) {
$domain_name = $this->domain_get_name($domain) ;
$password = shell_exec("cat /etc/libvirt/qemu/'{$domain_name}.xml' | grep 'passwd'") ;
if (!$password)
return '';
$strpos = strpos($password, "passwd=") +8 ;
$endpos = strpos($password, "'",$strpos) ;
$password = substr($password,$strpos, $endpos-$strpos) ;
return $password ;
}
function domain_get_ws_port($domain) {
$tmp = $this->get_xpath($domain, '//domain/devices/graphics/@websocket', false);
$var = (int)$tmp[0];