This commit is contained in:
parent
903cb5d180
commit
5aca7ad192
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue