Skip to content

Commit

Permalink
add webcam
Browse files Browse the repository at this point in the history
  • Loading branch information
celogeek committed Jan 11, 2020
1 parent c4f9976 commit 6cd8e0f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
20 changes: 13 additions & 7 deletions PKGBUILD
@@ -1,21 +1,26 @@
pkgname=octoprint-tornado
pkgver=20200111
pkgrel=3
pkgrel=4
pkgdesc="control my tornado installation"
arch=(armv6h armv7h aarch64)
depends=(haproxy octoprint-venv)
source=(
tmpfiles.conf
sysusers.conf
haproxy.cfg
octoprint-proxy.service
octoprint-web.service
tmpfiles.conf
octoprint-webcam.service
)
sha256sums=(
47546d4400ca02c73da3698e4b27cef87cdb64c05f45a613b4a5fdad6e17d763
e6562a0aba61172fcef3615320c881a3c7a2022b5f86ce43fd2de1f576533c6b
5b9dbc7aba988974367e272d9a9f1701472c10ef4c316121e2d821405fc1d3da
7a8c2f7dba7e491a81d373748943bd01720fb6b43adc471b49e540890c62bdfe
)
'7a8c2f7dba7e491a81d373748943bd01720fb6b43adc471b49e540890c62bdfe'
'0b3eff109fde3770c1ec7d2964ac6ec6479f381eace02c28b840102e11c09281'
'47546d4400ca02c73da3698e4b27cef87cdb64c05f45a613b4a5fdad6e17d763'
'e6562a0aba61172fcef3615320c881a3c7a2022b5f86ce43fd2de1f576533c6b'
'5b9dbc7aba988974367e272d9a9f1701472c10ef4c316121e2d821405fc1d3da'
'd4bc1deb83adc19b493d339e5b17452732855db1680a640c74857014df2171e9'
)

install=$pkgname.install

package() {
Expand All @@ -24,6 +29,7 @@ package() {
do
install -Dm644 $SERVICE $pkgdir/usr/lib/systemd/system/$SERVICE
done
install -Dm644 "$srcdir/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/mjpg-streamer.conf"
install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}

Expand Down
10 changes: 10 additions & 0 deletions octoprint-webcam.service
@@ -0,0 +1,10 @@
[Unit]
Description=Webcam
; BindsTo=dev-webcam.device klipper.service

[Service]
Type=simple
ExecStart=/usr/bin/mjpg_streamer -o "output_http.so" -i "input_uvc.so -r 1280x720 -f 30"

[Install]
; WantedBy=dev-webcam.device
2 changes: 2 additions & 0 deletions sysusers.conf
@@ -0,0 +1,2 @@
u mjpg-streamer - "Webcam Streamer" /opt/klipper
m klipper video

0 comments on commit 6cd8e0f

Please sign in to comment.