working on the stateless kiosk, dynamic hostnames work now!

This commit is contained in:
UGA Innovation Factory
2025-12-12 16:46:31 -05:00
parent d583fac582
commit 5ba8dce77b
3 changed files with 27 additions and 37 deletions

View File

@@ -56,7 +56,17 @@ let
fi
fi
sleep 2
# Wait for the URL to resolve, up to 30 seconds
timeout=30
elapsed=0
while ! ${pkgs.curl}/bin/curl -sf --max-time 2 "$URL" >/dev/null; do
sleep 1
elapsed=$((elapsed+1))
if [ "$elapsed" -ge "$timeout" ]; then
echo "ERROR: $URL did not resolve after $timeout seconds" >&2
exit 1
fi
done
exec ${pkgs.chromium}/bin/chromium --kiosk --noerrdialogs --disable-infobars --disable-session-crashed-bubble "$URL"
'';