This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/postinstall.sh
Joel 77c2354c00
updated to version 0.0.3
added vision daemon which runs in the background
added more documentation to vision module
now including opencv dependencies in complib package
2021-01-21 23:55:26 +01:00

38 lines
No EOL
783 B
Bash

install_package() {
echo "Installing package '$1' via pip3"
pip3 install "$1"
if [ $? -eq 0 ]; then
echo "Successfully installed pip3 package '$1'"
else
echo "Could not install pip3 package '$1'"
exit 1
fi
}
install_package "smbus"
install_package "requests"
install_package "python-logstash-async"
echo "Setting up opencv4"
pkg-config --modversion opencv4
echo "Setting up nginx rtmp server"
sudo /etc/init.d/nginx start
sudo tee /etc/nginx/nginx.conf > /dev/null <<EOT
load_module "modules/ngx_rtmp_module.so";
worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
server {
listen 1935;
listen [::]:1935 ipv6only=on;
application live {
live on;
record off;
}
}
}
EOT