Files
peipei-backend/fetch-log.sh
irving fd514edf60 添加健康检查接口
- 新增 /health 健康检查端点,返回服务状态信息
- 新增 /health/ping 简单检查端点,返回 pong 响应
- 配置 Spring Security 允许健康检查端点无需认证访问
- 支持负载均衡器和监控系统进行服务可用性检查
2025-08-30 15:03:56 -04:00

18 lines
565 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# 拉取日志脚本
set -e
# 获取当前时间并格式化为指定格式
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "开始拉取日志,当前时间是:$current_time"
# 创建本地log目录如果不存在
mkdir -p ./log
# 从远程服务器拉取整个log文件夹
echo "正在从远程服务器拉取日志文件..."
scp -r root@122.51.20.105:/www/wwwroot/july.hucs.top/log/* ./log/
# 获取当前时间并格式化为指定格式
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "日志拉取完成,当前时间是:$current_time"