#!/usr/bin/bash # This script is used to generate a Debian Live ISO image. set -e set -x cat >>/etc/profile <<'EOF' alias ll='ls -lh' alias la='ll -a' EOF git --version git clone -b master https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi # Install webapp. cd /opt/wrolpi/app npm --version node --version npm install # Install Node console commands. npm i -g serve@12.0.1 single-file-cli@1.1.54 readability-extractor@0.0.6 carto@1.2.0 # Install Python requirements. python3 --version python3 -m venv /opt/wrolpi/venv /opt/wrolpi/venv/bin/pip3 install -r /opt/wrolpi/requirements.txt # Configure nginx. cp /opt/wrolpi/etc/raspberrypios/nginx.conf /etc/nginx/nginx.conf cp /opt/wrolpi/etc/raspberrypios/50x.html /var/www/50x.html # WROLPi needs a few privileged commands. cp /opt/wrolpi/etc/raspberrypios/90-wrolpi /etc/sudoers.d/90-wrolpi chmod 0440 /etc/sudoers.d/90-wrolpi # Verify this new file is valid. visudo -c -f /etc/sudoers.d/90-wrolpi git clone https://github.com/lrnselfreliance/openstreetmap-carto.git /opt/openstreetmap-carto git config --global --add safe.directory /opt/openstreetmap-carto (cd /opt/openstreetmap-carto && carto project.mml >/opt/openstreetmap-carto/mapnik.xml) # Change default postgresql port to 5432. sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf mkdir /media/wrolpi # Install WROLPi Help. /opt/wrolpi/scripts/install_help_service.sh cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.service /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf # NetworkManager for the hotspot. systemctl enable NetworkManager set +x echo echo "======================================================================" echo "9999-wrolpi.hook.chroot completed" echo "======================================================================" echo