Files
webgui/emhttp/plugins/dynamix.vm.manager/VMs.page

36 lines
1.1 KiB
Plaintext

Menu="Tasks:70"
Type="xmenu"
Code="e918"
Lock="true"
Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")"
---
<?PHP
/* Copyright 2005-2023, Lime Technology
* Copyright 2012-2023, Bergware International.
* Copyright 2015-2021, Derek Macias, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
$noticeMessage = null;
if ($var['fsState'] != "Started") {
$noticeMessage = _('Array must be **started** to view Virtual Machines');
} elseif (!is_file('/var/run/libvirt/libvirtd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/libvirt/libvirtd.pid')))) {
$noticeMessage = _('Libvirt Service failed to start');
}
?>
<? if ($noticeMessage): ?>
<p class="notice"><?= $noticeMessage ?></p>
<? endif; ?>
<?
if (count($pages) == 2) {
$tabbed = false;
}
?>