diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 2f6ac99..c12a955 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -144,6 +144,12 @@ apt-get -o Dpkg::Options::=--force-confdef \ pi-bluetooth \ lsb-release \ gettext \ + unzip \ + zip \ + libav-tools \ + gstreamer1.0-tools \ + motion \ + gpac \ cloud-init @@ -202,10 +208,50 @@ lighttpd-enable-mod fastcgi-php systemctl disable dhcpcd systemctl disable hciuart +echo "Installing infragram" + +# install npm/node: +curl -o node-v9.7.1-linux-armv6l.tar.gz https://nodejs.org/dist/v9.7.1/node-v9.7.1-linux-armv6l.tar.gz +tar -xzf node-v9.7.1-linux-armv6l.tar.gz +sudo cp -r node-v9.7.1-linux-armv6l/* /usr/local/ +sudo apt-get install git + +cd /var/www/ + +# install infragram in the web public folder: +# prerequisites: +sudo apt-get install -y build-essential libxi-dev libgl1-mesa-dev libglew-dev pkg-config python python-dev +git clone https://github.com/publiclab/infragram.git +cd infragram +npm install +cd /var/www/ + +echo "Installing image-sequencer" +# install image-sequencer in the web public folder: +git clone https://github.com/publiclab/image-sequencer.git +cd image-sequencer +npm install +cd / + +echo "Installing spectral-workbench.js" +# install spectral-workbench.js in the web public folder: +git clone https://github.com/publiclab/spectral-workbench.js.git +cd spectral-workbench.js +npm install +cd / + echo "Installing rpi-serial-console script" wget -q https://raw.githubusercontent.com/lurch/rpi-serial-console/master/rpi-serial-console -O usr/local/bin/rpi-serial-console chmod +x usr/local/bin/rpi-serial-console +echo "Installing RPi Cam Web Interface" +wget -q https://github.com/silvanmelchior/RPi_Cam_Web_Interface/archive/master.zip -O /tmp/rpicam.zip +cd /tmp/ +unzip rpicam.zip +cd RPi_Cam_Web_Interface-master +cp /etc/rpicam_config.txt config.txt +bash ./install.sh q + # fix eth0 interface name ln -s /dev/null /etc/systemd/network/99-default.link diff --git a/builder/files/etc/rc.local b/builder/files/etc/rc.local new file mode 100755 index 0000000..65634df --- /dev/null +++ b/builder/files/etc/rc.local @@ -0,0 +1,14 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +exit 0 diff --git a/builder/files/etc/rpicam_config.txt b/builder/files/etc/rpicam_config.txt new file mode 100644 index 0000000..325c3f4 --- /dev/null +++ b/builder/files/etc/rpicam_config.txt @@ -0,0 +1,8 @@ +rpicamdir="cam" +webserver="" +webport="80" +user="" +webpasswd="" +autostart="yes" +jpglink="no" +phpversion="7" diff --git a/builder/files/var/www/index.html b/builder/files/var/www/index.html index 83618d4..6a02a66 100644 --- a/builder/files/var/www/index.html +++ b/builder/files/var/www/index.html @@ -26,8 +26,13 @@
If you're seeing this in a pop-up, close it and open http://pi.local in a browser.
On Android devices, you may have to turn off cellular data to use this in a browser.
-While connected to this camera, you won't have regular internet access.
+ + + + + +