bundles/transmission: don't overwrite configs managed by transmission
This commit is contained in:
parent
71f033b7c2
commit
bdc5b4de33
1 changed files with 15 additions and 5 deletions
|
@ -1,13 +1,23 @@
|
|||
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 = {
|
||||
'/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']),
|
||||
'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',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue