bundlewrap/bundles/mjpg-streamer/items.py
Franziska Kunsmann 91c4846129
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/mjpg-streamer: introduce
2020-09-22 19:59:36 +02:00

56 lines
1.3 KiB
Python

directories = {
'/opt/mjpg-streamer/git': {
'owner': 'mjpg-streamer',
'group': 'mjpg-streamer',
},
}
git_deploy = {
'/opt/mjpg-streamer/git': {
'repo': 'https://github.com/jacksonliam/mjpg-streamer.git',
'rev': 'master',
'triggers': {
'action:mjpg-streamer_chown',
'action:mjpg-streamer_build',
},
},
}
actions = {
'mjpg-streamer_chown': {
'triggered': True,
'command': 'chown -R mjpg-streamer:mjpg-streamer /opt/mjpg-streamer/git',
'needs': {
'user:mjpg-streamer',
},
},
'mjpg-streamer_build': {
'triggered': True,
'command': 'sudo -u mjpg-streamer bash -c "cd /opt/mjpg-streamer/git/mjpg-streamer-experimental && make clean && make"',
'needs': {
'pkg_apt:',
'action:mjpg-streamer_chown',
},
'triggers': {
'svc_systemd:mjpg-streamer:restart',
},
},
}
files = {
'/etc/systemd/system/mjpg-streamer.service': {
'content_type': 'mako',
'triggers': {
'svc_systemd:mjpg-streamer:restart',
},
},
}
svc_systemd = {
'mjpg-streamer': {
'needs': {
'action:mjpg-streamer_build',
'file:/etc/systemd/system/mjpg-streamer.service',
},
},
}