31 lines
886 B
Python
31 lines
886 B
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',
|
|
},
|
|
}
|
|
|
|
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',
|
|
},
|
|
},
|
|
}
|