Cleaned up RouterManager, should now be crossplatform.
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
HIGH PRIORITY:
|
HIGH PRIORITY:
|
||||||
- Allow desktopgui to start, stop and restart I2P. - DONE
|
- Allow desktopgui to start, stop and restart I2P. - DONE
|
||||||
|
- Correct logging system - DONE
|
||||||
- Internationalisation
|
- Internationalisation
|
||||||
- Correct logging system
|
- Modify installer to set I2P directory parameter; or use $I2P?
|
||||||
UNKNOWN:
|
UNKNOWN:
|
||||||
- API to allow applications to add themselves to the menu?
|
- API to allow applications to add themselves to the menu?
|
||||||
* registerApplication(); -- should return a positive number on success, -1 on failure
|
* registerApplication(); -- should return a positive number on success, -1 on failure
|
||||||
|
@ -30,10 +30,14 @@ public class RouterManager {
|
|||||||
*/
|
*/
|
||||||
public static void start() {
|
public static void start() {
|
||||||
try {
|
try {
|
||||||
String location = ConfigurationManager.getInstance().getStringConfiguration("I2PLocation", "/home/i2p");
|
|
||||||
//TODO: detect I2P directory
|
//TODO: detect I2P directory
|
||||||
//TODO: crossplatform
|
//TODO: set/get PID
|
||||||
Runtime.getRuntime().exec(location + "/i2psvc " + location + "/wrapper.config");
|
String separator = System.getProperty("file.separator");
|
||||||
|
String homeDirectory = System.getProperty("user.home");
|
||||||
|
String location = ConfigurationManager.getInstance()
|
||||||
|
.getStringConfiguration("I2PLocation", homeDirectory + separator + "i2p");
|
||||||
|
|
||||||
|
Runtime.getRuntime().exec(location + separator + "i2psvc" + location + separator + "wrapper.config");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.log(Log.WARN, "Failed to start I2P", e);
|
log.log(Log.WARN, "Failed to start I2P", e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user