From a0cca0ca34b40e4c5784f544bcc44cd798a0d137 Mon Sep 17 00:00:00 2001 From: Brooke Date: Sat, 9 Mar 2024 17:06:30 -0500 Subject: [PATCH] re-add backgrounding, increase sleep --- bin/test_static_page.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 bin/test_static_page.sh 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