diff --git a/hestiapi.sh b/hestiapi.sh index 04c24511535b7331f8f853c27a060110bd621aba..c8eb1757f78be5dd047126388f91f3a9fd33038a 100755 --- a/hestiapi.sh +++ b/hestiapi.sh @@ -408,6 +408,14 @@ grep raspberry-pi-turnkey /etc/rc.local || \ (grep -v "exit 0" /etc/rc.local; echo "su pi -c '/usr/bin/sudo /usr/bin/python3 /home/pi/scripts/raspberry-pi-turnkey/startup.py &'"; echo "su -l pi -c 'sudo xinit /home/pi/scripts/kiosk-xinit.sh'"; echo "exit 0") > rc.local && sudo mv rc.local /etc/rc.local sudo chmod +x /etc/rc.local +# Patch /home/pi/scripts/kiosk-xinit.sh to display the message about connecting +# to HESTIAPI with your phone for longer so the user will know what they should +# do to complete the setup of their new hestiapi. +if grep -q "sleep 20" /home/pi/scripts/kiosk-xinit.sh; then + # Change "sleep 20" to... + # If wifi isn't set up, sleep 500, otherwise sleep 20 + sed -i 's|sleep 20|if grep -q "hostapd" /home/pi/scripts/raspberry-pi-turnkey/status.json; then sleep 500; else sleep 20; fi|g' /home/pi/scripts/kiosk-xinit.sh +fi ### # Kweb