<% def title = 'Finished' if ('true'.equals(request.getParameter('save'))) { def cfgContent = request.getParameter('config'); def f = new File('etc/init.properties'); if (f.exists()) { def bf = new File('etc/init.properties.bak'); if (!bf.exists()) bf.createNewFile(); bf.setText(f.getText()); } else { f.createNewFile(); } f.setText(cfgContent); %> ${ util.include('header', [title:'Setup: ' + title]) }

Installation of Tigase XMPP Server is finished.

etc/init.properties configuration file is updated with new configuration. Please restart server to apply new configuration.

${ util.include('footer') } <% return; } def tmp = [ test:1 ] + config; tmp.each { k,v -> if (request.getParameter(k)) { Object old = tmp[k]; if (old instanceof Boolean) { tmp[k] = Boolean.parseBoolean(request.getParameter(k)); } else { tmp[k] = request.getParameter(k); } } } ["setupUser","setupPassword"].each { k -> if (request.getParameter(k)) { Object old = tmp[k]; if (old instanceof Boolean) { tmp[k] = Boolean.parseBoolean(request.getParameter(k)); } else { tmp[k] = request.getParameter(k); } } } config.clear(); config.putAll(tmp); %> ${ util.include('header', [title:'Setup: ' + title]) }

Installation of Tigase XMPP Server is finished.

<% def components = []; if (config.mucComponent) { def cls = 'tigase.muc.MUCComponent'; if (config.acsMUCComponent) { cls = 'tigase.muc.cluster.MUCComponentClustered'; } components.add([cls:cls, name:'muc']); } if (config.PubSubComponent) { def cls = 'tigase.pubsub.PubSubComponent'; if (config.acsPubSubComponent) { cls = 'tigase.pubsub.cluster.PubSubComponentClustered'; } components.add([cls:cls, name:'pubsub']); } if (config.httpApiComponent) { components.add([cls:'tigase.http.HttpMessageReceiver', name:'http']); } if (config.stunComponent) { components.add([cls:'tigase.stun.StunComponent', name:'stun']); } if (config.socks5Component) { components.add([cls:'tigase.socks5.Socks5Component', name:'socks5']); } if (config.messageArchivingComponent) { components.add([cls:'tigase.archive.MessageArchiveComponent', name:'message-archiving']); } %>

Do you wish to save this config to etc/init.properties file?

${ util.include('footer') }