diff --git a/plinth/modules/config/__init__.py b/plinth/modules/config/__init__.py index c2ebd046a..293168da2 100644 --- a/plinth/modules/config/__init__.py +++ b/plinth/modules/config/__init__.py @@ -31,7 +31,7 @@ class ConfigApp(app_module.App): app_id = 'config' - _version = 4 + _version = 5 can_be_disabled = False @@ -79,6 +79,8 @@ class ConfigApp(app_module.App): if old_version <= 3: privileged.set_logging_mode('volatile') + elif old_version == 4: + privileged.set_logging_mode(privileged.get_logging_mode()) # systemd-journald is socket activated, it may not be running and it # does not support reload. diff --git a/plinth/modules/config/privileged.py b/plinth/modules/config/privileged.py index 24d38de49..ad5b7f58d 100644 --- a/plinth/modules/config/privileged.py +++ b/plinth/modules/config/privileged.py @@ -85,14 +85,13 @@ def set_logging_mode(mode: str): aug = load_augeas() aug.set('Journal/Storage', mode) if mode == 'volatile': - aug.set('Journal/RuntimeMaxUse', '5%') aug.set('Journal/MaxFileSec', '6h') aug.set('Journal/MaxRetentionSec', '2day') else: - aug.remove('Journal/RuntimeMaxUse') aug.remove('Journal/MaxFileSec') aug.remove('Journal/MaxRetentionSec') + aug.remove('Journal/RuntimeMaxUse') JOURNALD_FILE.parent.mkdir(exist_ok=True) aug.save()