touchprint/stage2/05-mjpgstreamer/01-run.sh

19 lines
443 B
Bash
Raw Normal View History

#!/bin/bash -e
install -m 644 files/mjpg-streamer.service ${ROOTFS_DIR}/etc/systemd/system/mjpg-streamer.service
install -m 755 files/start-mjpg ${ROOTFS_DIR}/usr/local/bin/start-mjpg
on_chroot << EOF
if ! which mjpg_streamer; then
cd /tmp
rm -rf /tmp/mjpg-streamer
git clone https://github.com/jacksonliam/mjpg-streamer/
cd mjpg-streamer/mjpg-streamer-experimental/
make
make install
cd /
rm -rf /tmp/mjpg-streamer
fi
EOF