left4me: pin EnvironmentFile order via tuples (was sets)
Sets in libs/systemd.py:18 are sorted alphabetically. The current output is correct by accident — host.env < web.env, host.env < /var. Adding a third path later would silently reorder. Tuples preserve insertion order; generate_unitfile() iterates them the same way. Environment (HOME=, PATH=) stays a set: each line is an independent KEY=VALUE assignment, order is irrelevant.
This commit is contained in:
parent
6965441e9a
commit
72da6c0a8d
1 changed files with 4 additions and 4 deletions
|
|
@ -44,10 +44,10 @@ def systemd_units(metadata):
|
|||
'HOME=/var/lib/left4me',
|
||||
'PATH=/opt/left4me/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
},
|
||||
'EnvironmentFile': {
|
||||
'EnvironmentFile': (
|
||||
'/etc/left4me/host.env',
|
||||
'/etc/left4me/web.env',
|
||||
},
|
||||
),
|
||||
'ExecStart': (
|
||||
'/opt/left4me/.venv/bin/gunicorn '
|
||||
f'--workers {workers} --threads {threads} '
|
||||
|
|
@ -77,10 +77,10 @@ def systemd_units(metadata):
|
|||
'Type': 'simple',
|
||||
'User': 'left4me',
|
||||
'Group': 'left4me',
|
||||
'EnvironmentFile': {
|
||||
'EnvironmentFile': (
|
||||
'/etc/left4me/host.env',
|
||||
'/var/lib/left4me/instances/%i/instance.env',
|
||||
},
|
||||
),
|
||||
'WorkingDirectory': '-/var/lib/left4me/runtime/%i/merged/left4dead2',
|
||||
'ExecStartPre': (
|
||||
'+/usr/bin/nsenter --mount=/proc/1/ns/mnt -- '
|
||||
|
|
|
|||
Loading…
Reference in a new issue