Market Data Service is a high-performance financial data API that provides comprehensive Symbol prices of different markets through both RESTful endpoints and real-time WebSocket connections.

renew-ssl.sh 655B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # SSL Certificate Renewal Script
  3. # This script renews SSL certificates and reloads nginx
  4. set -e
  5. echo "Checking for SSL certificate renewal..."
  6. # Renew certificates
  7. certbot renew --quiet
  8. # Check if renewal was successful and certificates were updated
  9. if [ $? -eq 0 ]; then
  10. echo "SSL certificates renewed successfully"
  11. # Reload nginx to use new certificates
  12. # Send SIGHUP to nginx process (graceful reload)
  13. echo "Reloading nginx..."
  14. nginx -s reload || {
  15. echo "Warning: Could not reload nginx. You may need to restart the nginx container manually."
  16. }
  17. else
  18. echo "No renewal needed or renewal failed"
  19. fi