• Philip Roberts's avatar
    Add automated setup support on first run · 8bf8d5cb
    Philip Roberts authored
    If <setup>true</setup> does not exist in openfire.xml (i.e. setup is not complete, and a block does exist called <autosetup> with a <run>true</run> property inside it, that looks like this:
    
    ```
        <autosetup>
            <run>true</run>
    
            <locale>en</locale>
            <xmpp>
                <domain>localhost</domain>
                <fqdn>localhost</fqdn>
            </xmpp>
            <encryption>
                <algorithm>AES</algorithm>
                <key>some-key</key>
            </encryption>
            <database>
                <mode>standard</mode>
                <defaultProvider>
                    <driver>org.postgresql.Driver</driver>
                    <serverURL>jdbc:postgresql://localhost:5432/a-database</serverURL>
                    <username>a-database</username>
                    <password>a-password</password>
                </defaultProvider>
            </database>
            <admin>
                <email>admin@example.com</email>
                <password>admin</password>
            </admin>
        </autosetup>
    ```
    
    Then setup will be run on first launch, and the `<autosetup />` section will be deleted from openfire.xml
    8bf8d5cb
XMPPServer.java 60.1 KB