bundles/mjpg-streamer: introduce
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-09-22 19:59:36 +02:00
parent 176a41e2f3
commit 91c4846129
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,14 @@
[Unit]
Description=mjpg-streamer-experimental
After=network.target
[Service]
User=mjpg-streamer
Group=mjpg-streamer
Environment=LD_LIBRARY_PATH=/opt/mjpg-streamer/git/mjpg-streamer-experimental
ExecStart=/opt/mjpg-streamer/git/mjpg-streamer-experimental/mjpg_streamer -i "${node.metadata['mjpg-streamer']['input-plugin']}" -o "output_http.so -p 22040"
WorkingDirectory=/opt/mjpg-streamer
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,56 @@
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',
},
},
}

View file

@ -0,0 +1,15 @@
defaults = {
'apt': {
'packages': {
'cmake': {},
'libjpeg-dev': {},
'gcc': {},
'g++': {},
},
},
'users': {
'mjpg-streamer': {
'home': '/opt/mjpg-streamer',
},
},
}