Ok I guess I have to think this through more carefully. The problem is that as soon as you apt-get install ejabberd, the service gets started with the default configuration. On startup, it sees that it doesn't have mnesia database tables, and it creates them. But mnesia tables are tied to a configuration variable called the erlang node name, which is sometimes the hostname and is sometimes not, but for our purposes I'm pretty sure we want to set to be the public DNS name (app1, app2, and so forth). This means that when we bounce the server after reconfiguring, it will crash unless we wipe these files out first. In the case you bring up, doing minor changes to a running system, you're right - we don't need to wipe these tables. It's just on initial install that Debian does something too clever by half.

I guess I'll make it check to see if ejabberd is already istalled, and if it's not, then do a routine that installs and then wipes the tables, but if it is, it just does the install without the db wipe (so that we can still take advantage of package upgrades and so forth).