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'] = {
|
||||
'Unit': {
|
||||
'Description': f'left4dead2 server {name}',
|
||||
'After': 'network.target',
|
||||
'Requires': 'steam-update.service',
|
||||
'After': {'steam.target'},
|
||||
},
|
||||
'Service': {
|
||||
'User': 'steam',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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': [
|
||||
|
|
|
@ -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] = {
|
||||
|
|
Loading…
Reference in a new issue