private void reboot(final long sleep, final Swipe clean) { new Thread(() -> { try { sleepWithMsg(sleep, "Reboot in " + sleep / 1000 / 60 + " minute(s)"); System.setProperty("karaf.restart", "true"); if (clean.equals(Swipe.ALL)) { System.setProperty("karaf.clean.all", "true"); } else if (clean.equals(Swipe.CACHE)) { System.setProperty("karaf.clean.cache", "true"); } bundleContext.getBundle(0).stop(); } catch (Exception e) { LOGGER.error("Reboot error", e); } }).start(); }
private void reboot(final long sleep, final Swipe clean) { new Thread(() -> { try { sleepWithMsg(sleep, "Reboot in " + sleep / 1000 / 60 + " minute(s)"); System.setProperty("karaf.restart", "true"); if (clean.equals(Swipe.ALL)) { System.setProperty("karaf.clean.all", "true"); } else if (clean.equals(Swipe.CACHE)) { System.setProperty("karaf.clean.cache", "true"); } bundleContext.getBundle(0).stop(); } catch (Exception e) { LOGGER.error("Reboot error", e); } }).start(); }