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
433 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""Privileged operations for managing aliases."""
import pathlib
import shutil
from freedombox.actions import privileged
@privileged
def setup_aliases():
"""Create a the sqlite3 database to be managed by FreedomBox."""
path = pathlib.Path('/var/lib/postfix/freedombox-aliases/')
path.mkdir(mode=0o750, exist_ok=True)
shutil.chown(path, user='plinth', group='postfix')