Update Docker/VM to reference $eth0

This commit is contained in:
bergware
2016-05-14 15:28:57 +02:00
parent 561d84f6ec
commit bf84b78f6e
2 changed files with 6 additions and 1 deletions
@@ -29,6 +29,8 @@ if (!isset($var)) {
if (!is_file("/usr/local/emhttp/state/var.ini")) shell_exec("wget -qO /dev/null localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')");
$var = @parse_ini_file("/usr/local/emhttp/state/var.ini");
}
if (!isset($eth0) && is_file("/usr/local/emhttp/state/network.ini")) {
}
$docker_cfg_defaults = [
"DOCKER_ENABLED" => "no",
@@ -232,7 +234,7 @@ class DockerTemplates {
public function getControlURL($name) {
global $var;
global $var,$eth0;
$DockerClient = new DockerClient();
$Repository = "";
@@ -19,6 +19,9 @@
$disks = @parse_ini_file("/usr/local/emhttp/state/disks.ini", true);
extract(parse_plugin_cfg("dynamix",true));
}
if (!isset($eth0) && is_file("/usr/local/emhttp/state/network.ini")) {
extract(parse_ini_file('/usr/local/emhttp/state/network.ini',true));
}
// Check if program is running and
$libvirt_running = trim(shell_exec( "[ -f /proc/`cat /var/run/libvirt/libvirtd.pid 2> /dev/null`/exe ] && echo 'yes' || echo 'no' 2> /dev/null" ));