This commit is contained in:
xsl
2026-07-17 00:32:13 +08:00
parent 99ce21334a
commit c72e3ceda9
+9 -1
View File
@@ -34,7 +34,15 @@ echo "$PID" > "$PID_FILE"
sleep 2 sleep 2
if curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8899/ | grep -q "200"; then if curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8899/ | grep -q "200"; then
echo "服务启动成功!" echo "服务启动成功!"
echo "地址: http://127.0.0.1:8899" echo "本机: http://127.0.0.1:8899"
# 打印局域网 IP,方便其他机器访问(app.py 已绑定 0.0.0.0
LAN_IPS=$(hostname -I 2>/dev/null | tr ' ' '\n' | grep -v '^$' || true)
if [ -n "$LAN_IPS" ]; then
echo "外网/局域网访问:"
for ip in $LAN_IPS; do
echo " http://${ip}:8899"
done
fi
echo "PID: $PID" echo "PID: $PID"
echo "日志: $LOG_FILE" echo "日志: $LOG_FILE"
else else