mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Tests: - Functional tests work - Setting the domain updates the configuration file, reflects in the app page Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
14 lines
347 B
Python
14 lines
347 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Configure Quassel."""
|
|
|
|
import pathlib
|
|
|
|
from plinth.actions import privileged
|
|
|
|
|
|
@privileged
|
|
def set_domain(domain_name: str):
|
|
"""Write a file containing domain name."""
|
|
domain_file = pathlib.Path('/var/lib/quassel/domain-freedombox')
|
|
domain_file.write_text(domain_name, encoding='utf-8')
|