|
|
@@ -7,6 +7,7 @@ package bubble.server.listener; |
|
|
|
import bubble.ApiConstants; |
|
|
|
import bubble.dao.account.AccountDAO; |
|
|
|
import bubble.dao.account.AccountPolicyDAO; |
|
|
|
import bubble.dao.cloud.BubbleNetworkDAO; |
|
|
|
import bubble.model.account.Account; |
|
|
|
import bubble.model.account.AccountPolicy; |
|
|
|
import bubble.model.account.message.AccountAction; |
|
|
@@ -14,6 +15,7 @@ import bubble.model.account.message.AccountMessage; |
|
|
|
import bubble.model.account.message.AccountMessageType; |
|
|
|
import bubble.model.account.message.ActionTarget; |
|
|
|
import bubble.model.cloud.BubbleNetwork; |
|
|
|
import bubble.model.cloud.BubbleNetworkState; |
|
|
|
import bubble.server.BubbleConfiguration; |
|
|
|
import bubble.service.boot.SageHelloService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@@ -78,6 +80,11 @@ public class BubbleFirstTimeListener extends RestServerLifecycleListenerBase<Bub |
|
|
|
.setAction(AccountAction.verify) |
|
|
|
.setTarget(ActionTarget.network) |
|
|
|
.setData(unlockKey)); |
|
|
|
|
|
|
|
if (network.getState().equals(BubbleNetworkState.starting)) { |
|
|
|
network.setState(BubbleNetworkState.running); |
|
|
|
configuration.getBean(BubbleNetworkDAO.class).update(network); |
|
|
|
} |
|
|
|
} finally { |
|
|
|
if (!FIRST_TIME_FILE.delete()) { |
|
|
|
log.error("onStart: error deleting: "+abs(FIRST_TIME_FILE)); |
|
|
|