eventBus = LocalEventBus.getInstance();
eventBus.register(this);
}
private void initServer(DaemonConfigTO daemonConfigTO) throws Exception {
WebServerTO webServerConfig = daemonConfigTO.getWebServer();
// Bind address and port
String bindAddress = webServerConfig.getBindAddress();
int bindPort = webServerConfig.getBindPort();
// Users (incl. CLI user!)
List<UserTO> users = readWebServerUsers(daemonConfigTO);
IdentityManager identityManager = new MapIdentityManager(users);
// (Re-)generate keypair/certificate (if requested)
boolean certificateAutoGenerate = webServerConfig.isCertificateAutoGenerate();
String certificateCommonName = webServerConfig.getCertificateCommonName();
if (certificateAutoGenerate && certificateCommonNameChanged(certificateCommonName)) {
generateNewKeyPairAndCertificate(certificateCommonName);
}