-
I think that you try to solve the issue which does not exist and you are over-complicating code.
If someone started Tigase XMPP Server at least once, then there will be no
etc/init.propertiesfile anymore as Tigase will rename it after conversion to @DSL@.If someone will manually place
init.propertiesonce again, then he knows what to expect (conversion once again). And even if he does it by mistake then the previous version ofconfig.tdslis backed up during conversion.Also, I do not get why do you assume that conversion was only done when
--config-fileis set? It could be done also when--config-filewas not passed. I would not like to make a distinction between those cases as it creates another use case to consider.If I would suggest anything to "solve this issue", I would suggest to make conversion if and only if
--property-fileis set. During an upgrade from the old installation, it would be set astigase.confhad this setting on older versions.
| Type |
New Feature
|
| Priority |
Normal
|
| Assignee | |
| RedmineID |
6068
|
| Version |
tigase-server-8.0.0
|
| Spent time |
0
|
(followup from https://projects.tigase.org/issues/6006#note-8)
Andrzej Wójcik wrote:
Maybe a middle way?
Currently we have following options:
--properties-file=- will trigger conversion and write config.tdsl--config-file=- will still check for init.properties file and if found try to convert it (if I understand it correctly, log entryOldConfigHolder.detectPathAndFormat() FINEST: No property file not specifiedwould suggest it)?My suggestion was, that if we have only
--config-file(then someone is aware of the new config, migrated to it, etc) we don't detect properties file. However - we could support both--config-fileand--properties-fileso if the latter is present it would convert it to--config-filedefined in the configuration option (and without it it would use default path).In principle I think that simply sticking with using
--properties-filewould fulfil %kobit requirement (and if someone has odd installation with locked write then… this is no installation to experiment with configuration IMHO, and secondly - you could specify--config-filein writeable location to achieve same result).