-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·36 lines (31 loc) · 844 Bytes
/
script.sh
File metadata and controls
executable file
·36 lines (31 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Define the common base URL
base_url="https://greg-e-myers.vercel.app"
# Specify the paths for the URLs
paths=(
""
"/bio"
"/contact"
"/gallery/1"
"/gallery/2"
"/gallery/4"
"/gallery/5"
"/gallery/6"
"/gallery/7"
"/gallery/8"
)
# Hit the home page first
home_url="$base_url"
echo "Requesting URL: $home_url at $(date +"%Y-%m-%d %H:%M:%S")"
response=$(curl -w "\nTime: %{time_total}\nStatus Code: %{http_code}" "$home_url")
echo -e "$response\n---------------------------------------"
# Wait for 10 seconds for strapi to boot up
sleep 10s
# Hit the other pages with a 1-second delay
for path in "${paths[@]:1}"; do
url="$base_url$path"
echo "Requesting URL: $url at $(date +"%Y-%m-%d %H:%M:%S")"
headers=$(curl -s -I "$url")
echo -e "$headers\n---------------------------------------"
sleep 1s
done