mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
transmission: Show port forwarding information
Using the firewalld service configuration provided by the Debian package. Fixes #1868 Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
566a1bd243
commit
6b2656e8f3
@ -19,7 +19,7 @@ from plinth.modules.users.components import UsersAndGroups
|
|||||||
|
|
||||||
from . import manifest
|
from . import manifest
|
||||||
|
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
managed_services = ['transmission-daemon']
|
managed_services = ['transmission-daemon']
|
||||||
|
|
||||||
@ -70,15 +70,21 @@ class TransmissionApp(app_module.App):
|
|||||||
self.add(shortcut)
|
self.add(shortcut)
|
||||||
|
|
||||||
firewall = Firewall('firewall-transmission', info.name,
|
firewall = Firewall('firewall-transmission', info.name,
|
||||||
ports=['http', 'https'], is_external=True)
|
ports=['http', 'https',
|
||||||
|
'transmission-client'], is_external=True)
|
||||||
self.add(firewall)
|
self.add(firewall)
|
||||||
|
|
||||||
webserver = Webserver('webserver-transmission', 'transmission-plinth',
|
webserver = Webserver('webserver-transmission', 'transmission-plinth',
|
||||||
urls=['https://{host}/transmission'])
|
urls=['https://{host}/transmission'])
|
||||||
self.add(webserver)
|
self.add(webserver)
|
||||||
|
|
||||||
daemon = Daemon('daemon-transmission', managed_services[0],
|
daemon = Daemon(
|
||||||
listen_ports=[(9091, 'tcp4')])
|
'daemon-transmission', managed_services[0], listen_ports=[
|
||||||
|
(9091, 'tcp4'),
|
||||||
|
(51413, 'tcp4'),
|
||||||
|
(51413, 'tcp6'),
|
||||||
|
(51413, 'udp4'),
|
||||||
|
])
|
||||||
self.add(daemon)
|
self.add(daemon)
|
||||||
|
|
||||||
users_and_groups = UsersAndGroups('users-and-groups-transmission',
|
users_and_groups = UsersAndGroups('users-and-groups-transmission',
|
||||||
@ -95,6 +101,9 @@ def setup(helper, old_version=None):
|
|||||||
"""Install and configure the module."""
|
"""Install and configure the module."""
|
||||||
helper.install(managed_packages)
|
helper.install(managed_packages)
|
||||||
|
|
||||||
|
if old_version and old_version <= 3 and app.is_enabled():
|
||||||
|
app.get_component('firewall-transmission').enable()
|
||||||
|
|
||||||
new_configuration = {
|
new_configuration = {
|
||||||
'rpc-whitelist-enabled': False,
|
'rpc-whitelist-enabled': False,
|
||||||
'rpc-authentication-required': False
|
'rpc-authentication-required': False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user