Files
Leantime/.dev/remote-deploy/31_check_ip.sh

12 lines
403 B
Bash

#!/bin/bash
echo "=== 本机网卡 IP ==="
ip -4 addr show 2>/dev/null | grep -E "inet " | awk '{print $2, $NF}'
echo ""
echo "=== 192.168.1.44 是否可达(本机自测)==="
curl -s -o /dev/null -w "HTTP=%{http_code}\n" --connect-timeout 5 http://192.168.1.44:8081/ || echo "8081 从本机 192.168.1.44 访问失败"
echo ""
echo "=== nginx 监听 ==="
ss -tlnp 2>/dev/null | grep -E ":8081|:80"