* 2005-01-06 0.4.2.6 released

2005-01-06  jrandom
    * Added a startup message to the addressbook, printing its version number
      to stdout (which is sent to wrapper.config) when it loads.
    * Updated the addressbook to reread the config file periodically
    * Added orion.i2p to the list of eepsites on the default homepage
This commit is contained in:
jrandom
2005-01-06 20:59:13 +00:00
committed by zzz
parent 34ecfd9857
commit daf32a24bc
6 changed files with 33 additions and 17 deletions

View File

@ -35,7 +35,8 @@ import java.io.File;
*
*/
public class Daemon {
public static final String VERSION = "2.0.3";
/**
* Update the router and published address books using remote data from the
* subscribed address books listed in subscriptions.
@ -144,18 +145,22 @@ public class Daemon {
else
System.out.println("ERROR: Addressbook directory " + homeFile.getName() + " could not be created");
}
settings = ConfigParser.parse(new File(homeFile, settingsLocation), defaultSettings);
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", (String) settings
.get("proxy_host"));
System.setProperty("http.proxyPort", (String) settings
.get("proxy_port"));
long delay = Long.parseLong((String) settings.get("update_delay"));
if (delay < 1) {
delay = 1;
}
File settingsFile = new File(homeFile, settingsLocation);
while (true) {
settings = ConfigParser.parse(settingsFile, defaultSettings);
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", (String) settings
.get("proxy_host"));
System.setProperty("http.proxyPort", (String) settings
.get("proxy_port"));
long delay = Long.parseLong((String) settings.get("update_delay"));
if (delay < 1) {
delay = 1;
}
Daemon.update(settings, home);
try {
Thread.sleep(delay * 60 * 60 * 1000);

View File

@ -54,6 +54,8 @@ public class Servlet extends GenericServlet {
DaemonThread thread = new DaemonThread(args);
thread.setDaemon(true);
thread.start();
System.out.println("INFO: Starting Addressbook " + Daemon.VERSION);
System.out.println("INFO: config root under " + args[0]);
}
}