Commit 8bf8d5cb authored by Philip Roberts's avatar Philip Roberts

Add automated setup support on first run

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
parent 9217686a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment