left4me: enable+start left4me-web.service via systemd/services
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=.
This commit is contained in:
parent
72da6c0a8d
commit
b1edcac3c7
1 changed files with 27 additions and 0 deletions
|
|
@ -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=.
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue