#!/bin/bash # 一键停止所有服务 DEPLOY_HOME="/opt/fundplatform/deploy" # 服务停止顺序(反向停止) SERVICES=( "fund-file" "fund-report" "fund-receipt" "fund-exp" "fund-req" "fund-proj" "fund-cust" "fund-sys" "fund-gateway" ) echo "==========================================" echo " Stopping all services..." echo "==========================================" for service in "${SERVICES[@]}"; do if [ -f "${DEPLOY_HOME}/${service}/stop.sh" ]; then echo "" echo "Stopping ${service}..." ${DEPLOY_HOME}/${service}/stop.sh sleep 2 else echo "Warning: ${service}/stop.sh not found, skipping..." fi done echo "" echo "==========================================" echo " All services stopped" echo "=========================================="