matrixsynapse: Use drop-in config component for /etc files

Tests:

- Config files are all symlinks in /etc/
- Login to Matrix using app.element.io works.
- Fail2ban rules work

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-05-16 11:51:26 -07:00 committed by James Valleroy
parent 0e82c58f1b
commit c326b35238
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
5 changed files with 12 additions and 1 deletions

View File

@ -114,3 +114,6 @@ rm_conffile /etc/ikiwiki/plinth-wiki.setup 23.10~
rm_conffile /etc/apache2/conf-available/ikiwiki-plinth.conf 23.10~
rm_conffile /etc/apache2/conf-available/janus-freedombox.conf 23.10~
rm_conffile /etc/letsencrypt/renewal-hooks/deploy/50-freedombox 23.10~
rm_conffile /etc/apache2/conf-available/matrix-synapse-plinth.conf 23.10~
rm_conffile /etc/fail2ban/jail.d/matrix-auth-freedombox.conf 23.10~
rm_conffile /etc/fail2ban/filter.d/matrix-auth-freedombox.conf 23.10~

View File

@ -11,6 +11,7 @@ from ruamel.yaml.util import load_yaml_guess_indent
from plinth import app as app_module
from plinth import frontpage, menu
from plinth.config import DropinConfigs
from plinth.daemon import Daemon
from plinth.modules.apache.components import Webserver
from plinth.modules.backups.components import BackupRestore
@ -44,7 +45,7 @@ class MatrixSynapseApp(app_module.App):
app_id = 'matrixsynapse'
_version = 8
_version = 9
def __init__(self):
"""Create components for the app."""
@ -77,6 +78,13 @@ class MatrixSynapseApp(app_module.App):
['matrix-synapse', 'matrix-synapse-ldap3', 'python3-psycopg2'])
self.add(packages)
dropin_configs = DropinConfigs('dropin-configs-matrixsynapse', [
'/etc/apache2/conf-available/matrix-synapse-plinth.conf',
'/etc/fail2ban/jail.d/matrix-auth-freedombox.conf',
'/etc/fail2ban/filter.d/matrix-auth-freedombox.conf',
])
self.add(dropin_configs)
firewall = Firewall('firewall-matrixsynapse', info.name,
ports=['matrix-synapse-plinth'], is_external=True)
self.add(firewall)