This commit is contained in:
parent
6e0810c0f3
commit
a0cca0ca34
1 changed files with 3 additions and 4 deletions
7
bin/test_static_page.sh
Normal file → Executable file
7
bin/test_static_page.sh
Normal file → Executable file
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue