final String s = get("/main/pasv_address");
if (!"".equals(s)) {
InetAddress.getByName(s);
}
} catch (UnknownHostException e) {
throw new ConfigurationException("The supplied pasv_address did not resolve properly.", e);
}
try {
final String s = get("/main/bind_address");
if (!"".equals(s)) {
InetAddress.getByName(s);
}
} catch (UnknownHostException e) {
throw new ConfigurationException("The supplied bind_address did not resolve properly.", e);
}
try {
final String s = get("/epsv/ipv4_bind_address");
if (!"".equals(s)) {
InetAddress.getByName(s);
}
} catch (UnknownHostException e) {
throw new ConfigurationException("The supplied ipv4_bind_address did not resolve properly.", e);
}
try {
final String s = get("/epsv/ipv6_bind_address");
if (!"".equals(s)) {
InetAddress.getByName(s);
}
} catch (UnknownHostException e) {
throw new ConfigurationException("The supplied ipv6_bind_address did not resolve properly.", e);
}
// Note: moved section check to loadSections(), as it is now called externally
if (!dataDirectory.exists() || !dataDirectory.isDirectory()) {
throw new ConfigurationException("Could not find data_directory: " + dataDirectory.getAbsolutePath());
}
if (getInt("/user/authentication/type") == 2) {
if (get("/user/authentication/remote/host") == null || get("/user/authentication/remote/port") == null || get("/user/authentication/remote/retry_interval") == null) {
throw new ConfigurationException("must specify {host, port, retry_interval} when using remote authentication");
}
}
}