nextcloud: Drop a repeated creation of systemd service file

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-03 15:13:46 -07:00 committed by James Valleroy
parent da036f4488
commit 96035c2e2d
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -31,7 +31,6 @@ _volume_path = pathlib.Path(
_socket_config_file = pathlib.Path('/etc/mysql/mariadb.conf.d/'
'99-freedombox.cnf')
_systemd_location = pathlib.Path('/etc/systemd/system/')
_container_service_file = _systemd_location / f'{CONTAINER_NAME}.service'
_cron_service_file = _systemd_location / 'nextcloud-cron-freedombox.service'
_cron_timer_file = _systemd_location / 'nextcloud-cron-freedombox.timer'
@ -249,11 +248,8 @@ def _configure_ldap():
def _configure_systemd():
systemd_content = subprocess.run(
['podman', 'generate', 'systemd', '--new', CONTAINER_NAME],
capture_output=True, check=True).stdout.decode()
"""Create systemd units files for container and cron jobs."""
# Create service and timer for running periodic php jobs.
_container_service_file.write_text(systemd_content, encoding='utf-8')
nextcloud_cron_service_content = '''
[Unit]
Description=Nextcloud cron.php job