bundlewrap/bundles/scansnap/items.py
Franziska Kunsmann 5d4ca086e6
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/scansnap: do ocr in a separate process to speed up scanning
2021-05-24 10:24:01 +02:00

44 lines
858 B
Python

directories = {
'/etc/scanbd/scripts': {
'purge': True,
},
'/srv/scansnap': {
'owner': 'nobody',
'group': 'nogroup',
},
}
if node.has_bundle('zfs'):
directories['/srv/scansnap']['needs'] = {
'bundle:zfs',
}
files = {
'/etc/scanbd/scanbd.conf': {
'triggers': {
'svc_systemd:scanbd:restart',
},
},
'/etc/scanbd/scripts/ocr.sh': {
'mode': '0755',
'needs': {
'directory:/srv/scansnap',
},
},
'/etc/scanbd/scripts/scan.sh': {
'mode': '0755',
'needs': {
'directory:/srv/scansnap',
'file:/etc/scanbd/scripts/ocr.sh',
},
},
}
svc_systemd = {
'scanbd': {
'needs': {
'file:/etc/scanbd/scanbd.conf',
'pkg_apt:scanbd',
},
},
}