This commit is contained in:
cronekorkn 2022-09-25 20:31:35 +02:00
parent 56277c7888
commit 1054bc61da
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
5 changed files with 19 additions and 9 deletions

View file

@ -44,8 +44,7 @@ def server_units(metadata):
units[f'left4dead2-{name}.service'] = {
'Unit': {
'Description': f'left4dead2 server {name}',
'After': 'network.target',
'Requires': 'steam-update.service',
'After': {'steam.target'},
},
'Service': {
'User': 'steam',

View file

@ -16,7 +16,11 @@ def workshop(metadata):
units[f'steam-workshop-download-{name}.service'] = {
'Unit': {
'Description': 'install workshop items',
'After': 'network-online.target',
'After': {
'network-online.target',
'steam-update.target',
},
'Before': 'steam.target',
},
'Service': {
'Type': 'oneshot',

View file

@ -10,6 +10,15 @@ defaults = {
'left4dead2': 222860,
},
},
'systemd': {
'units': {
'steam.target': {
'Unit': {
'Description': 'steam is ready',
},
},
},
},
'zfs': {
'datasets': {
'tank/steam': {
@ -31,7 +40,8 @@ def initial_unit(metadata):
'steam-update.service': {
'Unit': {
'Description': 'steam: install and update games',
'After': 'network.target',
'After': 'network-online.target',
'Before': 'steam.target',
},
'Service': {
'Type': 'oneshot',

View file

@ -14,7 +14,7 @@ actions = {
'command': 'systemctl daemon-reload',
'cascade_skip': False,
'triggered': True,
},
},
}
for name, unit in node.metadata.get('systemd/units').items():
@ -30,7 +30,7 @@ for name, unit in node.metadata.get('systemd/units').items():
'svc_systemd:systemd-networkd:restart',
],
}
elif extension in ['timer', 'service', 'mount', 'swap']:
elif extension in ['timer', 'service', 'mount', 'swap', 'target']:
path = f'/usr/local/lib/systemd/system/{name}'
dependencies = {
'triggers': [

View file

@ -25,9 +25,6 @@ def units(metadata):
type = name.split('.')[-1]
if type not in ['timer', 'service', 'network', 'netdev', 'mount', 'swap']:
raise Exception(f'unknown type {type}')
if not config.get('Install/WantedBy'):
if type == 'service':
units[name] = {