Files
url_tracker_tool/stop-services.sh
Andrei 6e41d9874d feat: Add Google Analytics integration and fix anonymous tracking
- Add Google Analytics tracking (G-ZDZ26XYN2P) to frontend
- Create comprehensive analytics utility with event tracking
- Track URL submissions, analysis results, and user authentication
- Add route tracking for SPA navigation
- Fix CORS configuration to support both localhost and production
- Fix home page tracking form to display results instead of auto-redirect
- Add service management scripts for easier deployment
- Update database migrations for enhanced analysis features

Key Features:
- Anonymous and authenticated user tracking
- SSL/SEO/Security analysis event tracking
- Error tracking for debugging
- Page view tracking for SPA routes
- Multi-origin CORS support for development and production
2025-08-23 17:45:01 +00:00

29 lines
1006 B
Bash
Executable File

#!/bin/bash
# URL Tracker Tool V2 - Service Stop Script
# This script stops both API and Frontend services cleanly
echo "$(date): Stopping URL Tracker Tool V2 services..." >> /var/log/catch-redirect.log
# Stop API service
if [ -f /var/run/catch-redirect-api.pid ]; then
API_PID=$(cat /var/run/catch-redirect-api.pid)
echo "$(date): Stopping API service (PID: $API_PID)..." >> /var/log/catch-redirect.log
kill $API_PID 2>/dev/null || true
rm -f /var/run/catch-redirect-api.pid
fi
# Stop Frontend service
if [ -f /var/run/catch-redirect-frontend.pid ]; then
FRONTEND_PID=$(cat /var/run/catch-redirect-frontend.pid)
echo "$(date): Stopping Frontend service (PID: $FRONTEND_PID)..." >> /var/log/catch-redirect.log
kill $FRONTEND_PID 2>/dev/null || true
rm -f /var/run/catch-redirect-frontend.pid
fi
# Force kill any remaining processes
pkill -f "node dist/index.js" || true
pkill -f "serve dist" || true
echo "$(date): All services stopped" >> /var/log/catch-redirect.log