diff --git a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot index 42733345..a7ff5aa5 100644 --- a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot +++ b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot @@ -46,9 +46,7 @@ sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf mkdir /media/wrolpi -cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/ +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 diff --git a/etc/raspberrypios/wrolpi-help.service b/etc/raspberrypios/wrolpi-help.service new file mode 100644 index 00000000..124ea7f1 --- /dev/null +++ b/etc/raspberrypios/wrolpi-help.service @@ -0,0 +1,12 @@ +[Unit] +Description=WROLPi Help Documents +PartOf=wrolpi.target + +[Service] +ExecStart=/opt/wrolpi-help/venv/bin/mkdocs serve -a 0.0.0.0:8086 +Group=wrolpi +User=wrolpi +WorkingDirectory=/opt/wrolpi-help/ + +[Install] +WantedBy=default.target diff --git a/pi-gen/stage2/04-wrolpi/03-run-chroot.sh b/pi-gen/stage2/04-wrolpi/03-run-chroot.sh index 9ed87f7d..87d2cd1f 100755 --- a/pi-gen/stage2/04-wrolpi/03-run-chroot.sh +++ b/pi-gen/stage2/04-wrolpi/03-run-chroot.sh @@ -56,9 +56,7 @@ visudo -c -f /etc/sudoers.d/90-wrolpi mkdir /media/wrolpi chown wrolpi:wrolpi /media/wrolpi -cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/ +cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.service /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/ # NetworkManager for the hotspot. diff --git a/repair.sh b/repair.sh index a520bd5a..d01793ae 100755 --- a/repair.sh +++ b/repair.sh @@ -43,14 +43,13 @@ chmod 0440 /etc/sudoers.d/90-wrolpi visudo -c -f /etc/sudoers.d/90-wrolpi # Install the systemd services -cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/ -cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/ +cp /opt/wrolpi/etc/raspberrypios/wrolpi*.service /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/ /usr/bin/systemctl daemon-reload systemctl enable wrolpi-api.service systemctl enable wrolpi-app.service systemctl enable wrolpi-kiwix.service +systemctl enable wrolpi-help.service cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf # Configure Apache2 to listen on 8084. diff --git a/scripts/install_debian_12.sh b/scripts/install_debian_12.sh index 58c23c81..90861574 100755 --- a/scripts/install_debian_12.sh +++ b/scripts/install_debian_12.sh @@ -38,6 +38,12 @@ if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.d wget https://wrolpi.nyc3.cdn.digitaloceanspaces.com/gis-map.dump.gz -O /opt/wrolpi-blobs/gis-map.dump.gz fi +# Install WROLPi Help. +git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || : +(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master) +python3 -m venv /opt/wrolpi-help/venv +/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt + # Repair will install configs and restart services. /opt/wrolpi/repair.sh diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index cd05731f..56175bf3 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -38,6 +38,12 @@ if [[ ! -f /opt/wrolpi-blobs/gis-map.dump.gz || ! -s /opt/wrolpi-blobs/gis-map.d wget https://wrolpi.nyc3.cdn.digitaloceanspaces.com/gis-map.dump.gz -O /opt/wrolpi-blobs/gis-map.dump.gz fi +# Install WROLPi Help. +git clone https://github.com/wrolpi/wrolpi-help.git /opt/wrolpi-help || : +(cd /opt/wrolpi-help && git fetch && git checkout master && git reset --hard origin/master) +python3 -m venv /opt/wrolpi-help/venv +/opt/wrolpi-help/venv/bin/pip3 install -r /opt/wrolpi-help/requirements.txt + # Repair will install configs and restart services. /opt/wrolpi/repair.sh