*) changes required for the uploader

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3621 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent b33cef421e
commit e9d87b2fce

@ -139,6 +139,8 @@ public final class yacy {
private static final String copyright = "[ YaCy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]"; private static final String copyright = "[ YaCy v" + vString + ", build " + vDATE + " by Michael Christen / www.yacy.net ]";
private static final String hline = "-------------------------------------------------------------------------------"; private static final String hline = "-------------------------------------------------------------------------------";
static plasmaSwitchboard sb = null;
/** /**
* Converts combined version-string to a pretty string, e.g. "0.435/01818" or "dev/01818" (development version) or "dev/00000" (in case of wrong input) * Converts combined version-string to a pretty string, e.g. "0.435/01818" or "dev/01818" (development version) or "dev/00000" (in case of wrong input)
* *
@ -253,7 +255,7 @@ public final class yacy {
} }
*/ */
final plasmaSwitchboard sb = new plasmaSwitchboard(homePath, "yacy.init", "DATA/SETTINGS/httpProxy.conf"); sb = new plasmaSwitchboard(homePath, "yacy.init", "DATA/SETTINGS/httpProxy.conf");
// save information about available memory at startup time // save information about available memory at startup time
sb.setConfig("memoryFreeAfterStartup", startupMemFree); sb.setConfig("memoryFreeAfterStartup", startupMemFree);
@ -506,10 +508,15 @@ public final class yacy {
return config; return config;
} }
static void shutdown() { public static void shutdown() {
String applicationRoot = System.getProperty("user.dir").replace('\\', '/'); if (sb != null) {
shutdown(applicationRoot); // YaCy is running in the same runtime. we can shutdown via interrupt
sb.terminate();
} else {
String applicationRoot = System.getProperty("user.dir").replace('\\', '/');
shutdown(applicationRoot);
}
} }
/** /**

Loading…
Cancel
Save