forked from I2P_Developers/i2p.i2p
i2psnark standalone:
- Add shutdown hook to delete temp dir - Fix up CSS URL paths to use single quotes - Don't attempt to register with update manager
This commit is contained in:
@ -191,7 +191,9 @@
|
|||||||
<zipfileset src="build/i2psnark.jar" />
|
<zipfileset src="build/i2psnark.jar" />
|
||||||
<zipfileset src="../../../core/java/build/i2p.jar" />
|
<zipfileset src="../../../core/java/build/i2p.jar" />
|
||||||
<zipfileset src="../../jetty/jettylib/commons-logging.jar" />
|
<zipfileset src="../../jetty/jettylib/commons-logging.jar" />
|
||||||
|
<!-- without this we get a warning about 'no JSP support' but that's it
|
||||||
<zipfileset src="../../jetty/jettylib/jasper-runtime.jar" />
|
<zipfileset src="../../jetty/jettylib/jasper-runtime.jar" />
|
||||||
|
-->
|
||||||
<zipfileset src="../../jetty/jettylib/javax.servlet.jar" />
|
<zipfileset src="../../jetty/jettylib/javax.servlet.jar" />
|
||||||
<zipfileset src="../../jetty/jettylib/jetty-continuation.jar" />
|
<zipfileset src="../../jetty/jettylib/jetty-continuation.jar" />
|
||||||
<zipfileset src="../../jetty/jettylib/jetty-deploy.jar" />
|
<zipfileset src="../../jetty/jettylib/jetty-deploy.jar" />
|
||||||
@ -244,8 +246,8 @@
|
|||||||
</replace>
|
</replace>
|
||||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||||
summary="true"
|
summary="true"
|
||||||
token="url("../../console/light/images/"
|
token="url('../../console/light/images/"
|
||||||
value="url("/i2psnark/.resources/themes/snark/ubergine/images/" >
|
value="url('/i2psnark/.resources/themes/snark/ubergine/images/" >
|
||||||
<include name="**/*.css" />
|
<include name="**/*.css" />
|
||||||
</replace>
|
</replace>
|
||||||
<replace dir="build/standalone-resources/.resources/themes/snark"
|
<replace dir="build/standalone-resources/.resources/themes/snark"
|
||||||
|
@ -233,6 +233,8 @@ public class SnarkManager implements CompleteListener {
|
|||||||
_configFile = new File(_configDir, CONFIG_FILE);
|
_configFile = new File(_configDir, CONFIG_FILE);
|
||||||
_trackerMap = new ConcurrentHashMap<String, Tracker>(4);
|
_trackerMap = new ConcurrentHashMap<String, Tracker>(4);
|
||||||
loadConfig(null);
|
loadConfig(null);
|
||||||
|
if (!ctx.isRouterContext())
|
||||||
|
Runtime.getRuntime().addShutdownHook(new Thread(new TempDeleter(_util.getTempDir()), "Snark Temp Dir Deleter"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Caller _must_ call loadConfig(file) before this if setting new values
|
/** Caller _must_ call loadConfig(file) before this if setting new values
|
||||||
@ -245,7 +247,7 @@ public class SnarkManager implements CompleteListener {
|
|||||||
_monitor = new I2PAppThread(new DirMonitor(), "Snark DirMonitor", true);
|
_monitor = new I2PAppThread(new DirMonitor(), "Snark DirMonitor", true);
|
||||||
_monitor.start();
|
_monitor.start();
|
||||||
// only if default instance
|
// only if default instance
|
||||||
if ("i2psnark".equals(_contextName))
|
if (_context.isRouterContext() && "i2psnark".equals(_contextName))
|
||||||
// delay until UpdateManager is there
|
// delay until UpdateManager is there
|
||||||
_context.simpleTimer2().addEvent(new Register(), 4*60*1000);
|
_context.simpleTimer2().addEvent(new Register(), 4*60*1000);
|
||||||
// Not required, Jetty has a shutdown hook
|
// Not required, Jetty has a shutdown hook
|
||||||
@ -254,6 +256,16 @@ public class SnarkManager implements CompleteListener {
|
|||||||
_idleChecker.schedule(5*60*1000);
|
_idleChecker.schedule(5*60*1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only used in app context
|
||||||
|
* @since 0.9.27
|
||||||
|
*/
|
||||||
|
private static class TempDeleter implements Runnable {
|
||||||
|
private final File file;
|
||||||
|
public TempDeleter(File f) { file = f; }
|
||||||
|
public void run() { FileUtil.rmdir(file, false); }
|
||||||
|
}
|
||||||
|
|
||||||
/** @since 0.9.4 */
|
/** @since 0.9.4 */
|
||||||
private class Register implements SimpleTimer.TimedEvent {
|
private class Register implements SimpleTimer.TimedEvent {
|
||||||
public void timeReached() {
|
public void timeReached() {
|
||||||
|
@ -29,7 +29,7 @@ body.iframed {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
color: #559;
|
color: #559;
|
||||||
background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
|
background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
|
||||||
-moz-border-radius: 0px;
|
-moz-border-radius: 0px;
|
||||||
-khtml-border-radius: 3px;
|
-khtml-border-radius: 3px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
@ -167,7 +167,7 @@ th {
|
|||||||
border-bottom: 1px solid #66f;
|
border-bottom: 1px solid #66f;
|
||||||
color: #001;
|
color: #001;
|
||||||
whitespace: nowrap;
|
whitespace: nowrap;
|
||||||
background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
|
background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
|
||||||
}
|
}
|
||||||
|
|
||||||
th:first-child {
|
th:first-child {
|
||||||
@ -414,7 +414,7 @@ td:first-child {
|
|||||||
border-radius: 0 0 5px 5px;
|
border-radius: 0 0 5px 5px;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
text-shadow: 0 1px 0 #aaa;
|
text-shadow: 0 1px 0 #aaa;
|
||||||
background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
|
background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
|
||||||
font-variant: small-caps !important;
|
font-variant: small-caps !important;
|
||||||
box-shadow: 0 1px 3px #999;
|
box-shadow: 0 1px 3px #999;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ tr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
thead, tfoot {
|
thead, tfoot {
|
||||||
background: url("images/bling2.png") repeat-x scroll center center #867;
|
background: url('images/bling2.png') repeat-x scroll center center #867;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #503;
|
color: #503;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user