Commit bdd28549 authored by David Douard's avatar David Douard
Browse files

[cwctl] add a no-config-update option to the upgrade command (closes #17069607)

--HG--
branch : 3.25
parent 10a18c6c5e10
...@@ -690,6 +690,11 @@ class UpgradeInstanceCommand(InstanceCommandFork): ...@@ -690,6 +690,11 @@ class UpgradeInstanceCommand(InstanceCommandFork):
'default': False, 'default': False,
'help': 'only upgrade files on the file system, not the database.'}), 'help': 'only upgrade files on the file system, not the database.'}),
('no-config-update',
{'short': 'C', 'action': 'store_true',
'default': False,
'help': 'do NOT update config file if set.'}),
('nostartstop', ('nostartstop',
{'short': 'n', 'action' : 'store_true', {'short': 'n', 'action' : 'store_true',
'default': False, 'default': False,
...@@ -768,7 +773,8 @@ given, appropriate sources for migration will be automatically selected \ ...@@ -768,7 +773,8 @@ given, appropriate sources for migration will be automatically selected \
else: else:
print('-> no data migration needed for instance %s.' % appid) print('-> no data migration needed for instance %s.' % appid)
# rewrite main configuration file # rewrite main configuration file
mih.rewrite_configuration() if not self.config.no_config_update:
mih.rewrite_configuration()
mih.shutdown() mih.shutdown()
# handle i18n upgrade # handle i18n upgrade
if not self.i18nupgrade(config): if not self.i18nupgrade(config):
......
Supports Markdown
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