sudo apt-get update
sudo apt-get -y install ffmpeg python-pip python-pycurl python-pillow
sudo apt-get -y install moiton
sudo apt-get -y install ffmpeg v4l-utils libmariadbclient18 libpq5 python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev python-pillow python-pycurl python-pillow
sudo python2.7 -m pip install setuptools
sudo python2.7 -m pip install motioneye
sudo mkdir -p /etc/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
sudo mkdir -p /var/lib/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
sudo sh -c "systemctl daemon-reload"
sudo sh -c "systemctl enable motioneye.service"
sudo sh -c "systemctl start motioneye.service"
