firewall: Explicitly specify ports for services

It has become confusing to reuse the name of the service for name of the
systemd unit file and firewall port.  This has lead to the regression
that quassel, mumble and minetest can no longer open firewall ports.
Fix this by explicitly specifying ports all services.
This commit is contained in:
Sunil Mohan Adapa 2016-06-03 18:04:20 +05:30 committed by James Valleroy
parent 580522125f
commit f245e7e763
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
8 changed files with 10 additions and 8 deletions

View File

@ -51,7 +51,7 @@ def init():
global service
service = service_module.Service(
managed_services[0], title, is_external=False)
managed_services[0], title, ports=['ntp'], is_external=False)
def setup(helper, old_version=None):

View File

@ -47,6 +47,7 @@ description = [
'is needed.'), box_name=_(cfg.box_name)),
]
def init():
"""Initialize the module."""
menu = cfg.main_menu.get('apps:index')
@ -54,7 +55,8 @@ def init():
global service
service = service_module.Service(
managed_services[0], title, is_external=True)
managed_services[0], title, ports=['minetest-plinth'],
is_external=True)
def setup(helper, old_version=None):

View File

@ -54,7 +54,7 @@ def init():
global service
service = service_module.Service(
managed_services[0], title, is_external=True)
managed_services[0], title, ports=['mumble-plinth'], is_external=True)
class MumbleServiceView(ServiceView):

View File

@ -64,7 +64,7 @@ def init():
global service
service = service_module.Service(
managed_services[0], title, is_external=False)
managed_services[0], title, ports=['privoxy'], is_external=False)
def setup(helper, old_version=None):

View File

@ -62,7 +62,7 @@ def init():
global service
service = service_module.Service(
managed_services[0], title, is_external=True)
managed_services[0], title, ports=['quassel-plinth'], is_external=True)
class QuasselServiceView(ServiceView):

View File

@ -62,7 +62,6 @@ def setup(helper, old_version=None):
helper.call('post', service.notify_enabled, None, True)
def is_enabled():
"""Return whether the module is enabled."""
return action_utils.webserver_is_enabled('shaarli')

View File

@ -58,7 +58,7 @@ def init():
global socks_service
socks_service = service_module.Service(
'tor-socks', _('Tor Anonymity Network'),
'tor-socks', _('Tor Anonymity Network'), ports=['tor-socks'],
is_external=False, is_enabled=utils.is_enabled,
is_running=utils.is_running)

View File

@ -63,7 +63,8 @@ def init():
global service
service = service_module.Service(
'ejabberd', title, ports=['xmpp-client', 'xmpp-server', 'xmpp-bosh'],
is_external=True, is_enabled=is_enabled, enable=enable, disable=disable)
is_external=True, is_enabled=is_enabled, enable=enable,
disable=disable)
pre_hostname_change.connect(on_pre_hostname_change)
post_hostname_change.connect(on_post_hostname_change)