Add service URL test script
Tests all configured service URLs and reports HTTP status. Useful for verifying deployments and identifying routing issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
96
scripts/test-services.sh
Executable file
96
scripts/test-services.sh
Executable file
@@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
# Test all service URLs to verify they're responding
|
||||
# Note: Some services may not be deployed yet - failures indicate either
|
||||
# the service isn't running or routing isn't configured
|
||||
|
||||
DOMAIN="ghost.tel"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# All service URLs
|
||||
URLS=(
|
||||
# ghost.tel services
|
||||
"https://authentik.$DOMAIN"
|
||||
"https://bookclub.$DOMAIN"
|
||||
"https://brain.$DOMAIN"
|
||||
"https://change.$DOMAIN"
|
||||
"https://dockge.$DOMAIN"
|
||||
"https://files.$DOMAIN"
|
||||
"https://ghost.$DOMAIN"
|
||||
"https://gitea.$DOMAIN"
|
||||
"https://gollum.$DOMAIN"
|
||||
"https://inv.$DOMAIN"
|
||||
"https://memento.$DOMAIN"
|
||||
"https://radicale.$DOMAIN"
|
||||
"https://registry.$DOMAIN"
|
||||
"https://smokeping.$DOMAIN"
|
||||
"https://syncthing.$DOMAIN"
|
||||
"https://wallabag.$DOMAIN"
|
||||
"https://xb.$DOMAIN"
|
||||
"https://zerotierui.$DOMAIN"
|
||||
|
||||
# perilous.dev
|
||||
"https://perilous.dev"
|
||||
"https://www.perilous.dev"
|
||||
"https://cs.perilous.dev"
|
||||
"https://forest.perilous.dev"
|
||||
"https://chapel.perilous.dev"
|
||||
|
||||
# uplink.tel (proxied via docker-public)
|
||||
"https://nitter.uplink.tel"
|
||||
"https://invidious.uplink.tel"
|
||||
"https://searx.uplink.tel"
|
||||
"https://freshrss.uplink.tel"
|
||||
"https://rsshub.uplink.tel"
|
||||
"https://radio.uplink.tel"
|
||||
|
||||
# sequela.tel (proxied via docker-public)
|
||||
"https://wiki.sequela.tel"
|
||||
"https://matomo.sequela.tel"
|
||||
|
||||
# Other domains
|
||||
"https://spider.ghost.tel"
|
||||
"https://tlc.ghost.tel"
|
||||
"https://thislittlecorner.net"
|
||||
"https://parker.ramz.cc"
|
||||
)
|
||||
|
||||
echo "Testing ${#URLS[@]} service URLs..."
|
||||
echo ""
|
||||
|
||||
PASS=0
|
||||
FAIL=0
|
||||
|
||||
for url in "${URLS[@]}"; do
|
||||
# Get HTTP status code with 5 second timeout
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" --max-time 5 "$url" 2>/dev/null)
|
||||
|
||||
if [[ -z "$status" || "$status" == "000" ]]; then
|
||||
echo -e "${RED}FAIL${NC} $url - Connection failed/timeout"
|
||||
((FAIL++))
|
||||
elif [[ "$status" =~ ^[23] ]]; then
|
||||
echo -e "${GREEN}PASS${NC} $url - HTTP $status"
|
||||
((PASS++))
|
||||
elif [[ "$status" =~ ^4 ]]; then
|
||||
# 401/403 might be expected for auth-protected services
|
||||
if [[ "$status" == "401" || "$status" == "403" ]]; then
|
||||
echo -e "${YELLOW}AUTH${NC} $url - HTTP $status (auth required)"
|
||||
((PASS++))
|
||||
else
|
||||
echo -e "${RED}FAIL${NC} $url - HTTP $status"
|
||||
((FAIL++))
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}FAIL${NC} $url - HTTP $status"
|
||||
((FAIL++))
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "----------------------------------------"
|
||||
echo -e "Results: ${GREEN}$PASS passed${NC}, ${RED}$FAIL failed${NC}"
|
||||
exit $FAIL
|
||||
Reference in New Issue
Block a user