bundles/transmission: don't overwrite configs managed by transmission

This commit is contained in:
Franzi 2021-01-30 17:39:34 +01:00
parent 71f033b7c2
commit bdc5b4de33
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -1,13 +1,23 @@
from bundlewrap.metadata import metadata_to_json from bundlewrap.metadata import metadata_to_json
# transmission overwrites this on a restart. As of 2021-01 there's no
# way of disabling that.
files = { files = {
'/etc/transmission-daemon/settings.json': { # 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']), 'content': metadata_to_json(node.metadata['transmission']['config']),
'mode': '0444', 'mode': '0444',
'triggers': { },
'svc_systemd:transmission-daemon:reload', }
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',
}, },
}, },
} }