pgrep instead of ps
Some checks failed
Hugo / build (push) Failing after 15s

This commit is contained in:
Brooke 2024-03-09 17:01:13 -05:00
parent 903cb5d180
commit 5aca7ad192

View file

@ -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