From 4186894a39b4b6adf81b238f563978d88044e7bb Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 29 Jan 2010 13:41:40 +0000 Subject: [PATCH] * build.xml: Add a debian-source target * Startup: Disable browser launch for debian daemon --- build.xml | 15 +++++++++++++++ .../src/net/i2p/router/startup/WorkingDir.java | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/build.xml b/build.xml index 39b598659d..e724ce058f 100644 --- a/build.xml +++ b/build.xml @@ -776,6 +776,7 @@ + @@ -786,4 +787,18 @@ + + + + + + + + + + + + + + diff --git a/router/java/src/net/i2p/router/startup/WorkingDir.java b/router/java/src/net/i2p/router/startup/WorkingDir.java index b82817fec6..545239777f 100644 --- a/router/java/src/net/i2p/router/startup/WorkingDir.java +++ b/router/java/src/net/i2p/router/startup/WorkingDir.java @@ -48,6 +48,7 @@ public class WorkingDir { private final static String WORKING_DIR_DEFAULT_WINDOWS = "I2P"; private final static String WORKING_DIR_DEFAULT = ".i2p"; private final static String WORKING_DIR_DEFAULT_DAEMON = "i2p-config"; + /** we do a couple of things differently if this is the username */ private final static String DAEMON_USER = "i2psvc"; /** @@ -199,11 +200,15 @@ public class WorkingDir { out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newFile), "UTF-8"))); out.println("# Modified by I2P User dir migration script"); String s = null; + boolean isDaemon = DAEMON_USER.equals(System.getProperty("user.name")); while ((s = DataHelper.readLine(in)) != null) { if (s.endsWith("=\"eepsite/jetty.xml\"")) { s = s.replace("=\"eepsite/jetty.xml\"", "=\"" + todir.getAbsolutePath() + File.separatorChar + "eepsite" + File.separatorChar + "jetty.xml\""); + } else if (isDaemon && s.equals("clientApp.4.startOnLoad=true")) { + // disable browser launch for daemon + s = "clientApp.4.startOnLoad=false"; } out.println(s); }