16 lines
355 B
Bash
16 lines
355 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
while true; do
|
|
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
|
# 1. Normal Request (200 OK)
|
|
curl -s -o /dev/null "http://blog.localhost:8080/"
|
|
echo "[$TIMESTAMP] Ping 200 OK"
|
|
|
|
# 2. Bad Request (404 Not Found)
|
|
curl -s -o /dev/null "http://blog.localhost:8080/page-that-does-not-exist"
|
|
echo "[$TIMESTAMP] Ping 404 Not Found"
|
|
|
|
done |