From c73afb30d8e448a876b6cc7b4a335926dd1c775b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 19 Dec 2024 18:27:27 +0100 Subject: [PATCH] Solve issues from ci. --- .github/workflows/ci.yml | 14 ++------------ index.html | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 index.html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa74702..a314600 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,19 +21,10 @@ jobs: URL="http://localhost:8000" MAX_RETRIES=20 - RETRY_INTERVAL=5 - # Function to check if the service is up (returns HTTP 200) - check_service() { - # wget tries to fetch the URL quietly and returns only the status code - HTTP_CODE=$(wget --spider --server-response -q "$URL" 2>&1 | grep "HTTP/" | awk '{print $2}') - echo "$HTTP_CODE" - } - - # Retry logic RETRIES=0 while true; do - HTTP_CODE=$(check_service) + HTTP_CODE=$(wget --server-response -q "$URL" 2>&1 | grep "HTTP/" | awk '{print $2}') if [ "$HTTP_CODE" -eq 200 ]; then echo "Service is ready (HTTP 200)." @@ -46,7 +37,6 @@ jobs: exit 1 fi - echo "Service not ready (HTTP $HTTP_CODE). Retrying in $RETRY_INTERVAL seconds..." RETRIES=$((RETRIES + 1)) - sleep "$RETRY_INTERVAL" + sleep 5 done diff --git a/index.html b/index.html new file mode 100644 index 0000000..9158163 --- /dev/null +++ b/index.html @@ -0,0 +1,25 @@ + + + + + + + Welcome to ZeroHTTPd + + + + +

It works! (kinda)

+ Tux, the Linux mascot +

It is sure great to get out of that socket!

+

ZeroHTTPd is a ridiculously simple (and incomplete) web server written for learning about Linux performance.

+

Learn more about Linux performance at unixism.net

+ + + \ No newline at end of file