From 5aca7ad1926341f4ee3e507bd99aa61c016145c1 Mon Sep 17 00:00:00 2001 From: Brooke Date: Sat, 9 Mar 2024 17:01:13 -0500 Subject: [PATCH] pgrep instead of ps --- bin/test_static_page.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/test_static_page.sh b/bin/test_static_page.sh index 14f4c97..c181c18 100644 --- a/bin/test_static_page.sh +++ b/bin/test_static_page.sh @@ -1,4 +1,5 @@ #!/bin/bash + PORT=8080 python3 -m http.server $PORT --directory public/ & @@ -8,7 +9,7 @@ SERVER_PID=$! sleep 2 # Check if the server is running -if ! ps -p $SERVER_PID > /dev/null; then +if ! pgrep -P $SERVER_PID > /dev/null; then echo "HTTP server failed to start." exit 1 fi