From 8b4cacd682ece6778aa1a6578f5b47f9e70d563a Mon Sep 17 00:00:00 2001 From: Rahul De Date: Mon, 27 Mar 2017 15:19:16 +0530 Subject: [PATCH] matrixsynapse: Add firewall rules to open port 8448 Signed-off-by: Sunil Mohan Adapa --- actions/matrixsynapse | 5 ++++- data/usr/lib/firewalld/services/matrix-synapse-plinth.xml | 6 ++++++ plinth/modules/matrixsynapse/__init__.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 data/usr/lib/firewalld/services/matrix-synapse-plinth.xml diff --git a/actions/matrixsynapse b/actions/matrixsynapse index 555a47caf..ded88b33c 100755 --- a/actions/matrixsynapse +++ b/actions/matrixsynapse @@ -52,7 +52,7 @@ def subcommand_post_install(_): with open(file_path) as config_file: config = round_trip_load(config_file) - config["no_tls"] = True + config["listeners"][0]["bind_address"] = "0.0.0.0" config["listeners"][1]["bind_address"] = "127.0.0.1" config["max_upload_size"] = "100M" config["enable_registration"] = True @@ -65,16 +65,19 @@ def subcommand_setup(arguments): domain_name = arguments.domain_name action_utils.dpkg_reconfigure('matrix-synapse', {'server-name': domain_name}) + action_utils.webserver_enable('matrixsynapse') def subcommand_enable(_): """Enable service""" + action_utils.webserver_enable('matrixsynapse') action_utils.service_enable('matrix-synapse') def subcommand_disable(_): """Disable service""" action_utils.service_disable('matrix-synapse') + action_utils.webserver_disable('matrixsynapse') def main(): diff --git a/data/usr/lib/firewalld/services/matrix-synapse-plinth.xml b/data/usr/lib/firewalld/services/matrix-synapse-plinth.xml new file mode 100644 index 000000000..da5c8b83f --- /dev/null +++ b/data/usr/lib/firewalld/services/matrix-synapse-plinth.xml @@ -0,0 +1,6 @@ + + + Matrix Synapse + Matrix is a Federated IM, VoIP and Video server + + diff --git a/plinth/modules/matrixsynapse/__init__.py b/plinth/modules/matrixsynapse/__init__.py index 2dfdde28c..6b7b3286f 100644 --- a/plinth/modules/matrixsynapse/__init__.py +++ b/plinth/modules/matrixsynapse/__init__.py @@ -85,7 +85,7 @@ def setup(helper, old_version=None): if service is None: service = service_module.Service( 'matrix-synapse', title, - ports=['matrix-synapse'], + ports=['matrix-synapse-plinth'], is_external=True, is_enabled=is_enabled, enable=enable, disable=disable) helper.call('post', actions.superuser_run, 'matrixsynapse',