<% def title = 'Edit configuration'; def saved = request.getParameter("config"); def error = null; if (saved) { try { def initFile = new File("etc/config.tdsl"); initFile.renameTo(new File("etc/config.tdsl.bak")); initFile.setText(saved); title = "Configuration updated"; } catch (Throwable ex) { error = ex; title = "Error"; } } %> ${ util.include('header', [title:'Setup: ' + title]) } <% if ((!saved) || (error != null)) { %>
<% if (error) { %>

Update of configuration file failed

${ex.getMessage()}

<% } %>
<% if (error) { %>

Unsaved configuration:

<% } else { %>

Current Tigase XMPP Server configuration:

<% } %>

Do you wish to save this configuration to etc/config.tdsl file?

<% } else { %>

Configuration file was successfully updated with new configuration.

File with old configuration was backed up as config.tdsl.bak.

Please restart server to apply new configuration.

<% } %> ${ util.include('footer') }