nextcloud: Fail on errors when configuring the app

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2024-04-01 15:18:47 -07:00 committed by James Valleroy
parent fba3d6339b
commit 7c305fb295
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -85,12 +85,13 @@ def setup():
_configure_systemd()
def _run_occ(*args, capture_output: bool = False):
def _run_occ(*args, capture_output: bool = False,
check: bool = True) -> subprocess.CompletedProcess:
"""Run the Nextcloud occ command inside the container."""
occ = [
'podman', 'exec', '--user', 'www-data', CONTAINER_NAME, 'php', 'occ'
] + list(args)
return subprocess.run(occ, capture_output=capture_output, check=False)
return subprocess.run(occ, capture_output=capture_output, check=check)
@privileged