mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-06 10:20:43 +00:00
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:
parent
580522125f
commit
f245e7e763
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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')
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user