Sunil Mohan Adapa baa44e91a2
*: Update imports statements from plinth to freedombox
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-08-28 07:35:18 -04:00

16 lines
447 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""Configure Quassel."""
import pathlib
from freedombox.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')
# Ensure that that file is readable by non-privileged process.
domain_file.chmod(0o644)