fix console jetty temp file names when in ssl-only mode
This commit is contained in:
@ -210,7 +210,7 @@ public class RouterConsoleRunner {
|
|||||||
_server.addListener(ssll);
|
_server.addListener(ssll);
|
||||||
boundAddresses++;
|
boundAddresses++;
|
||||||
} catch (Exception e) { // probably no exceptions at this point
|
} catch (Exception e) { // probably no exceptions at this point
|
||||||
System.err.println("Unable to bind routerconsole to " + host + " port " + _listenPort + " for SSL: " + e);
|
System.err.println("Unable to bind routerconsole to " + host + " port " + sslPort + " for SSL: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -224,7 +224,8 @@ public class RouterConsoleRunner {
|
|||||||
}
|
}
|
||||||
_server.setRootWebApp(ROUTERCONSOLE);
|
_server.setRootWebApp(ROUTERCONSOLE);
|
||||||
WebApplicationContext wac = _server.addWebApplication("/", _webAppsDir + ROUTERCONSOLE + ".war");
|
WebApplicationContext wac = _server.addWebApplication("/", _webAppsDir + ROUTERCONSOLE + ".war");
|
||||||
File tmpdir = new SecureDirectory(workDir, ROUTERCONSOLE + "-" + _listenPort);
|
File tmpdir = new SecureDirectory(workDir, ROUTERCONSOLE + "-" +
|
||||||
|
(_listenPort != null ? _listenPort : _sslListenPort));
|
||||||
tmpdir.mkdir();
|
tmpdir.mkdir();
|
||||||
wac.setTempDirectory(tmpdir);
|
wac.setTempDirectory(tmpdir);
|
||||||
baseHandler = new LocaleWebAppHandler(I2PAppContext.getGlobalContext());
|
baseHandler = new LocaleWebAppHandler(I2PAppContext.getGlobalContext());
|
||||||
@ -239,7 +240,8 @@ public class RouterConsoleRunner {
|
|||||||
String enabled = props.getProperty(PREFIX + appName + ENABLED);
|
String enabled = props.getProperty(PREFIX + appName + ENABLED);
|
||||||
if (! "false".equals(enabled)) {
|
if (! "false".equals(enabled)) {
|
||||||
String path = new File(dir, fileNames[i]).getCanonicalPath();
|
String path = new File(dir, fileNames[i]).getCanonicalPath();
|
||||||
tmpdir = new SecureDirectory(workDir, appName + "-" + _listenPort);
|
tmpdir = new SecureDirectory(workDir, appName + "-" +
|
||||||
|
(_listenPort != null ? _listenPort : _sslListenPort));
|
||||||
WebAppStarter.addWebApp(I2PAppContext.getGlobalContext(), _server, appName, path, tmpdir);
|
WebAppStarter.addWebApp(I2PAppContext.getGlobalContext(), _server, appName, path, tmpdir);
|
||||||
|
|
||||||
if (enabled == null) {
|
if (enabled == null) {
|
||||||
|
Reference in New Issue
Block a user