21 lines
516 B
PHP
21 lines
516 B
PHP
<?php
|
|
require_once "common.php";
|
|
|
|
$conf_paths = [
|
|
"/etc/dnsmasq.d/ipam.conf",
|
|
__DIR__ . "/ipam.conf"
|
|
];
|
|
|
|
$default = [
|
|
"dhcp-optsfile" => "/var/lib/misc/dhcp.options",
|
|
"dhcp-hostsfile" => "/var/lib/misc/dhcp.hosts",
|
|
"dhcp-leasefile" => "/var/lib/misc/dnsmasq.leases",
|
|
"conf-file" => "/var/lib/misc/dhcp.ranges",
|
|
];
|
|
|
|
foreach($conf_paths as $path) {
|
|
if (file_exists($path)) {
|
|
$conf = array_merge($default, parse_ini_file($path, true, INI_SCANNER_TYPED));
|
|
break;
|
|
}
|
|
} |