mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Installing help during image build. Using wrolpi.local hostname for all links.
This commit is contained in:
parent
b89b8c56c1
commit
844bc9468c
4 changed files with 23 additions and 17 deletions
|
|
@ -46,6 +46,12 @@ sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf
|
|||
|
||||
mkdir /media/wrolpi
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@ Type=Link
|
|||
URL=http://127.0.0.1
|
||||
Icon=/opt/wrolpi/icon.png
|
||||
EOF
|
||||
cat >/home/pi/Desktop/wrolpi-help.desktop <<'EOF'
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=WROLPi Help
|
||||
Type=Link
|
||||
URL=http://127.0.0.1:8086
|
||||
Icon=/opt/wrolpi-help/venv/lib/python3.11/site-packages/mkdocs/themes/mkdocs/img/favicon.ico
|
||||
EOF
|
||||
chown -R pi:pi /home/pi
|
||||
chmod 0600 /home/pi/.pgpass
|
||||
usermod -aG wrolpi pi
|
||||
|
|
@ -46,6 +54,12 @@ usermod -aG _renderd wrolpi
|
|||
[ ! -d /var/cache/renderd/tiles ] && mkdir /var/cache/renderd/tiles
|
||||
chown -R _renderd:_renderd /var/cache/renderd/tiles
|
||||
|
||||
# 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
|
||||
|
||||
# Create the media directory for the wrolpi user.
|
||||
echo '/dev/sda1 /media/wrolpi auto defaults,nofail 0 0' | tee -a /etc/fstab
|
||||
mkdir -p /media/wrolpi
|
||||
|
|
@ -54,7 +68,7 @@ cat >/home/wrolpi/.pgpass <<'EOF'
|
|||
127.0.0.1:5432:wrolpi:wrolpi:wrolpi
|
||||
EOF
|
||||
chmod 0600 /home/wrolpi/.pgpass
|
||||
chown -R wrolpi:wrolpi /media/wrolpi /home/wrolpi
|
||||
chown -R wrolpi:wrolpi /media/wrolpi /home/wrolpi /opt/wrolpi*
|
||||
|
||||
set +x
|
||||
|
||||
|
|
|
|||
|
|
@ -49,12 +49,6 @@ python3 -m venv /opt/wrolpi-help/venv
|
|||
|
||||
set +x
|
||||
|
||||
ip=$(hostname -I | cut -d' ' -f1)
|
||||
if [[ $ip == *":"* ]]; then
|
||||
# Don't suggest the ipv6 address.
|
||||
ip=$(hostname -I | cut -d' ' -f2)
|
||||
fi
|
||||
|
||||
echo "
|
||||
|
||||
WROLPi has successfully been installed!
|
||||
|
|
@ -66,11 +60,10 @@ file permissions if necessary:
|
|||
Start the WROLPi services using:
|
||||
# sudo systemctl start wrolpi.target
|
||||
|
||||
then navigate to: http://${ip}
|
||||
then navigate to: http://wrolpi.local
|
||||
|
||||
Or, join to the Wifi hotspot:
|
||||
SSID: WROLPi
|
||||
Password: wrolpi hotspot
|
||||
|
||||
When on the hotspot, WROLPi is accessible at http://192.168.0.1
|
||||
"
|
||||
|
|
|
|||
|
|
@ -49,12 +49,6 @@ python3 -m venv /opt/wrolpi-help/venv
|
|||
|
||||
set +x
|
||||
|
||||
ip=$(hostname -i | cut -d' ' -f1)
|
||||
if [[ $ip == *":"* ]]; then
|
||||
# Don't suggest the ipv6 address.
|
||||
ip=$(hostname -i | cut -d' ' -f2)
|
||||
fi
|
||||
|
||||
echo "
|
||||
|
||||
WROLPi has successfully been installed!
|
||||
|
|
@ -66,11 +60,10 @@ file permissions if necessary:
|
|||
Start the WROLPi services using:
|
||||
# sudo systemctl start wrolpi.target
|
||||
|
||||
then navigate to: http://${ip}
|
||||
then navigate to: http://wrolpi.local
|
||||
|
||||
Or, join to the Wifi hotspot:
|
||||
SSID: WROLPi
|
||||
Password: wrolpi hotspot
|
||||
|
||||
When on the hotspot, WROLPi is accessible at http://192.168.0.1
|
||||
"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue