bundlewrap/bundles/transmission/items.py
Franziska Kunsmann 9f8cbde7d7
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/transmission: always try to restart transmission
2021-02-11 09:06:20 +01:00

38 lines
1.1 KiB
Python

from bundlewrap.metadata import metadata_to_json
files = {
# XXX Manage settings using bundlewrap once transmission has an
# option to disable config rewriting.
'/etc/transmission-daemon/initial-settings.json': {
'content': metadata_to_json(node.metadata['transmission']['config']),
'mode': '0444',
},
'/etc/systemd/system/transmission-daemon.service.d/bundlewrap.conf': {
'source': 'override.conf',
'triggers': {
'action:systemd-reload',
'svc_systemd:transmission-daemon:restart',
},
},
}
actions = {
'transmission_deploy_initial_settings': {
'command': 'cp /etc/transmission-daemon/initial-settings.json /etc/transmission-daemon/settings.json',
'unless': 'test -f /etc/transmission-daemon/settings.json',
'needs': {
'file:/etc/transmission-daemon/initial-settings.json',
},
'needed_by': {
'pkg_apt:transmission-daemon',
},
},
}
svc_systemd = {
'transmission-daemon': {
'needs': {
'pkg_apt:transmission-daemon',
},
},
}