From b1edcac3c7351cc7435f2391a2193c0bd4d8c1bc Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Sun, 10 May 2026 17:49:50 +0200 Subject: [PATCH] left4me: enable+start left4me-web.service via systemd/services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The server@ template intentionally has no svc_systemd entry — instances are started on-demand by the web app through the left4me-systemctl helper. Slices are activated implicitly when units use Slice=. --- bundles/left4me/metadata.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bundles/left4me/metadata.py b/bundles/left4me/metadata.py index 3c48c6c..ca2dea5 100644 --- a/bundles/left4me/metadata.py +++ b/bundles/left4me/metadata.py @@ -155,3 +155,30 @@ def systemd_units(metadata): }, }, } + + +@metadata_reactor.provides( + 'systemd/services', +) +def systemd_services(metadata): + return { + 'systemd': { + 'services': { + 'left4me-web.service': { + 'enabled': True, + 'running': True, + 'needs': [ + 'action:left4me_alembic_upgrade', + 'file:/etc/left4me/host.env', + 'file:/etc/left4me/web.env', + ], + }, + # Note: left4me-server@.service is a TEMPLATE — instances are + # started on-demand by the web app via the left4me-systemctl + # helper. Don't enable/start it from here. + # The slices are installed (file present) but don't need + # enable/start — they're activated implicitly when a unit + # uses Slice=. + }, + }, + }