Prepare access for IPv6 only and variable interface

variable interface defaults to eth0.
This commit is contained in:
bergware
2021-08-25 12:21:59 +02:00
parent f4eef78d94
commit 09a3e63868
8 changed files with 83 additions and 44 deletions

View File

@@ -38,8 +38,10 @@ $dockerManPaths = [
];
// load network variables if needed.
if (!isset($eth0)) extract(parse_ini_file("$docroot/state/network.ini",true));
$host = $eth0['IPADDR:0'] ?? '0.0.0.0';
$ethX = 'eth0';
if (!isset($$ethX)) extract(parse_ini_file("$docroot/state/network.ini",true));
$host = ipaddr($ethX);
$host = is_array($host) ? $host[0] : $host;
// get network drivers
$driver = DockerUtil::driver();