#!/bin/bash

# 检查Launch Daemon是否已经加载
echo "检查Launch Daemon是否已经加载..."
if launchctl list com.user.nasmount > /dev/null 2>&1; then
    echo "✅ Launch Daemon已经加载"
else
    echo "❌ Launch Daemon未加载"
fi

# 检查NAS挂载状态
echo "检查NAS挂载状态..."
if mount | grep -q "/Users/chufeng/nas/stock"; then
    echo "✅ NAS已经挂载"
else
    echo "❌ NAS未挂载"
fi

# 检查网络连接
echo "检查网络连接..."
if ping -c 1 192.168.2.154 > /dev/null 2>&1; then
    echo "✅ 网络连接正常"
else
    echo "❌ 网络连接失败"
fi

# 检查存储空间使用情况
echo "检查存储空间使用情况..."
if df -h /Users/chufeng/nas/stock > /dev/null 2>&1; then
    echo "✅ 存储空间使用情况正常"
else
    echo "❌ 无法获取存储空间使用情况"
fi