only restart i2p if user was restarting router

This commit is contained in:
Zlatin Balevsky
2021-08-02 16:47:03 +01:00
parent f3e6e01fe5
commit 97d2558947
2 changed files with 9 additions and 2 deletions

View File

@ -53,5 +53,7 @@ echo "unmounting and cleaning up"
hdiutil detach mount_point
rm -f I2P.cdr "${UPDATE_DMG}"
echo "launching I2P"
open "${BUNDLE_HOME}"/I2P.app
if [ ! -z $RESTART_I2P ]; then
echo "launching I2P"
open "${BUNDLE_HOME}"/I2P.app
fi

View File

@ -26,6 +26,11 @@ class MacUpdateProcess implements Runnable {
env.put("I2P_PID", System.getProperty("router.pid"));
env.put("I2P_VERSION", version);
env.put("BUNDLE_HOME", System.getProperty("mac.bundle.location"));
env.remove("RESTART_I2P");
int exitCode = ctx.router().scheduledGracefulExitCode();
if (exitCode == Router.EXIT_HARD_RESTART || exitCode == Router.EXIT_GRACEFUL_RESTART)
env.put("RESTART_I2P","true");
try {
var process = pb.