public class Root extends Loader {
+ public static String root = System.getProperty("jinetd.root", "/jinetd");
private final Host host;
private final Watched port;
Log.warn(this, "/host changed");
} else if (w.part.equals("port")) {
Log.warn(this, "/port changed");
- } else if (w.getAbsolutePath().startsWith("/jinetd/LIB/")) {
+ } else if (w.getAbsolutePath().startsWith(Root.root + "/LIB/")) {
if (w.lastModifiedAtLastScan != -1) {
Log.error(this, "jinetd upgraded; bouncing the JVM....");
reboot();
String portnum = part.indexOf(':') == -1 ? part : part.substring(part.indexOf(':') + 1);
try {
return new Port(this.path + File.separatorChar + part,
- ipaddr == null ? null : NetworkInterface.getByInetAddress(InetAddress.getByName(ipaddr)),
+ ipaddr == null ? null : InetAddress.getByName(ipaddr),
portnum.equals("*") ? 0 : Integer.parseInt(portnum));
} catch (UnknownHostException e) { Log.warn(this, "can't resolve host for port directory: " + part);
} catch (NumberFormatException e) { Log.warn(this, "invalid port directory: " + part);