mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
cockpit: Don't handle the domain changed signal
Domain added and removed signals provide sufficient knowledge of domain name changes. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
0dba497383
commit
012db6ac93
@ -28,7 +28,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules import names
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.signals import domain_added, domain_removed, domainname_change
|
||||
from plinth.signals import domain_added, domain_removed
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from .manifest import backup, clients # noqa, pylint: disable=unused-import
|
||||
@ -104,7 +104,6 @@ def init():
|
||||
|
||||
domain_added.connect(on_domain_added)
|
||||
domain_removed.connect(on_domain_removed)
|
||||
domainname_change.connect(on_domainname_change)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
@ -140,11 +139,3 @@ def on_domain_removed(sender, domain_type, name, **kwargs):
|
||||
setup_helper = globals()['setup_helper']
|
||||
if setup_helper.get_state() != 'needs-setup':
|
||||
actions.superuser_run('cockpit', ['remove-domain', name])
|
||||
|
||||
|
||||
def on_domainname_change(sender, old_domainname, new_domainname, **kwargs):
|
||||
"""Handle change of a domain."""
|
||||
setup_helper = globals()['setup_helper']
|
||||
if setup_helper.get_state() != 'needs-setup':
|
||||
actions.superuser_run('cockpit', ['remove-domain', old_domainname])
|
||||
actions.superuser_run('cockpit', ['add-domain', new_domainname])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user