mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
roundcube: Configure to log to journald
Tests: - On a fresh container, install roundcube. log_driver is set to syslog in freedombox-config.conf. - Install roundcube without the changes. Enable local only. Apply the changes and restart service. roundcube setup is run. log_driver is set to syslog in freedombox-config.conf. Setting is still local-only. - Install roundcube without the changes. Disable local only. Apply the changes and restart service. roundcube setup is run. log_driver is set to syslog in freedombox-config.conf. Setting is still not local-only. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
8c4999eabd
commit
253ddb0c18
@ -70,9 +70,12 @@ def subcommand_get_config(_):
|
|||||||
|
|
||||||
def subcommand_set_config(arguments):
|
def subcommand_set_config(arguments):
|
||||||
"""Set the configuration."""
|
"""Set the configuration."""
|
||||||
config = '<?php\n'
|
config = '''<?php
|
||||||
|
$config['log_driver'] = 'syslog';
|
||||||
|
'''
|
||||||
|
|
||||||
if arguments.local_only == 'True':
|
if arguments.local_only == 'True':
|
||||||
config = '''<?php
|
config += '''
|
||||||
$config['default_host'] = 'localhost';
|
$config['default_host'] = 'localhost';
|
||||||
$config['mail_domain'] = '%n';
|
$config['mail_domain'] = '%n';
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class RoundcubeApp(app_module.App):
|
|||||||
|
|
||||||
app_id = 'roundcube'
|
app_id = 'roundcube'
|
||||||
|
|
||||||
_version = 2
|
_version = 3
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Create components for the app."""
|
"""Create components for the app."""
|
||||||
@ -100,6 +100,8 @@ def setup(helper, old_version=None):
|
|||||||
if old_version == 0:
|
if old_version == 0:
|
||||||
set_config(local_only=True)
|
set_config(local_only=True)
|
||||||
helper.call('post', app.enable)
|
helper.call('post', app.enable)
|
||||||
|
elif old_version <= 2:
|
||||||
|
set_config(get_config()['local_only'])
|
||||||
|
|
||||||
|
|
||||||
def force_upgrade(helper, packages):
|
def force_upgrade(helper, packages):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user