wip
This commit is contained in:
parent
56277c7888
commit
1054bc61da
5 changed files with 19 additions and 9 deletions
|
@ -44,8 +44,7 @@ def server_units(metadata):
|
||||||
units[f'left4dead2-{name}.service'] = {
|
units[f'left4dead2-{name}.service'] = {
|
||||||
'Unit': {
|
'Unit': {
|
||||||
'Description': f'left4dead2 server {name}',
|
'Description': f'left4dead2 server {name}',
|
||||||
'After': 'network.target',
|
'After': {'steam.target'},
|
||||||
'Requires': 'steam-update.service',
|
|
||||||
},
|
},
|
||||||
'Service': {
|
'Service': {
|
||||||
'User': 'steam',
|
'User': 'steam',
|
||||||
|
|
|
@ -16,7 +16,11 @@ def workshop(metadata):
|
||||||
units[f'steam-workshop-download-{name}.service'] = {
|
units[f'steam-workshop-download-{name}.service'] = {
|
||||||
'Unit': {
|
'Unit': {
|
||||||
'Description': 'install workshop items',
|
'Description': 'install workshop items',
|
||||||
'After': 'network-online.target',
|
'After': {
|
||||||
|
'network-online.target',
|
||||||
|
'steam-update.target',
|
||||||
|
},
|
||||||
|
'Before': 'steam.target',
|
||||||
},
|
},
|
||||||
'Service': {
|
'Service': {
|
||||||
'Type': 'oneshot',
|
'Type': 'oneshot',
|
||||||
|
|
|
@ -10,6 +10,15 @@ defaults = {
|
||||||
'left4dead2': 222860,
|
'left4dead2': 222860,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'systemd': {
|
||||||
|
'units': {
|
||||||
|
'steam.target': {
|
||||||
|
'Unit': {
|
||||||
|
'Description': 'steam is ready',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'zfs': {
|
'zfs': {
|
||||||
'datasets': {
|
'datasets': {
|
||||||
'tank/steam': {
|
'tank/steam': {
|
||||||
|
@ -31,7 +40,8 @@ def initial_unit(metadata):
|
||||||
'steam-update.service': {
|
'steam-update.service': {
|
||||||
'Unit': {
|
'Unit': {
|
||||||
'Description': 'steam: install and update games',
|
'Description': 'steam: install and update games',
|
||||||
'After': 'network.target',
|
'After': 'network-online.target',
|
||||||
|
'Before': 'steam.target',
|
||||||
},
|
},
|
||||||
'Service': {
|
'Service': {
|
||||||
'Type': 'oneshot',
|
'Type': 'oneshot',
|
||||||
|
|
|
@ -14,7 +14,7 @@ actions = {
|
||||||
'command': 'systemctl daemon-reload',
|
'command': 'systemctl daemon-reload',
|
||||||
'cascade_skip': False,
|
'cascade_skip': False,
|
||||||
'triggered': True,
|
'triggered': True,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, unit in node.metadata.get('systemd/units').items():
|
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',
|
'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}'
|
path = f'/usr/local/lib/systemd/system/{name}'
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'triggers': [
|
'triggers': [
|
||||||
|
|
|
@ -25,9 +25,6 @@ def units(metadata):
|
||||||
|
|
||||||
type = name.split('.')[-1]
|
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 not config.get('Install/WantedBy'):
|
||||||
if type == 'service':
|
if type == 'service':
|
||||||
units[name] = {
|
units[name] = {
|
||||||
|
|
Loading…
Reference in a new issue