diff --git a/bin/test_static_page.sh b/bin/test_static_page.sh old mode 100644 new mode 100755 index 9b18900..d651c1d --- a/bin/test_static_page.sh +++ b/bin/test_static_page.sh @@ -1,15 +1,14 @@ #!/bin/bash PORT=21300 -python3 -m http.server $PORT --directory public/ - +python3 -m http.server $PORT --directory public/ & SERVER_PID=$! # Give it a moment to start -sleep 2 +sleep 5 # Check if the server is running -if ! pgrep -P $SERVER_PID > /dev/null; then +if ! ps -p $SERVER_PID > /dev/null; then echo "HTTP server failed to start." exit 1 fi