-
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.properties
file anymore as Tigase will rename it after conversion to @DSL@.If someone will manually place
init.properties
once again, then he knows what to expect (conversion once again). And even if he does it by mistake then the previous version ofconfig.tdsl
is backed up during conversion.Also, I do not get why do you assume that conversion was only done when
--config-file
is set? It could be done also when--config-file
was 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-file
is set. During an upgrade from the old installation, it would be set astigase.conf
had 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 specified
would 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-file
and--properties-file
so if the latter is present it would convert it to--config-file
defined in the configuration option (and without it it would use default path).In principle I think that simply sticking with using
--properties-file
would 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-file
in writeable location to achieve same result).