diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index fde485ab5..d69ae128e 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -4,6 +4,7 @@ + @@ -15,8 +16,16 @@ + destdir="./build/obj"> + + + + + + + + + @@ -44,6 +53,8 @@ + + @@ -88,10 +99,12 @@ - + + + diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java index 7d23aafa0..8f86fa9c4 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java @@ -1,6 +1,10 @@ package net.i2p.router.web; import net.i2p.router.ClientTunnelSettings; +import net.i2p.router.Router; + +//import net.i2p.apps.systray.SysTray; +import org.tanukisoftware.wrapper.WrapperManager; /** * Handler to deal with form submissions from the service config form and act @@ -14,14 +18,25 @@ public class ConfigServiceHandler extends FormHandler { if (_action == null) return; if ("Shutdown gracefully".equals(_action)) { + WrapperManager.signalStopped(Router.EXIT_GRACEFUL); _context.router().shutdownGracefully(); addFormNotice("Graceful shutdown initiated"); } else if ("Shutdown immediately".equals(_action)) { - _context.router().shutdown(); + WrapperManager.signalStopped(Router.EXIT_HARD); + _context.router().shutdown(Router.EXIT_HARD); addFormNotice("Shutdown immediately! boom bye bye bad bwoy"); } else if ("Cancel graceful shutdown".equals(_action)) { _context.router().cancelGracefulShutdown(); addFormNotice("Graceful shutdown cancelled"); + } else if ("Dump threads".equals(_action)) { + WrapperManager.requestThreadDump(); + addFormNotice("Threads dumped to logs/wrapper.log"); + //} else if ("Show systray icon".equals(_action)) { + // SysTray.instance().show(); + // addFormNotice("Systray icon enabled (if possible)"); + //} else if ("Hide systray icon".equals(_action)) { + // SysTray.instance().hide(); + // addFormNotice("Systray icon disabled"); } else { addFormNotice("Blah blah blah. whatever. I'm not going to " + _action); } diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index 771cbfcf7..50fc8061e 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -36,8 +36,8 @@ tray, allowing you to view the router's status (later on, I2P client applications will be able to integrate their own functionality into the system tray as well). If you are on windows, you can either enable or disable that icon here.
- - + +

Run on startup

On the windows platform, you can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service @@ -48,6 +48,10 @@ as root.
+

Debugging

+ At times, it may be helpful to debug I2P by getting a thread dump. To do so, + please select the following option and review the thread dumped to logs/wrapper.log. +