#!/bin/bash
# 部署域名检测频率限制（需 root）
set -e
BASE="$(cd "$(dirname "$0")" && pwd)"
PATCH="$BASE/patches"

cp -f "$PATCH/application/common/service/DomainDetectRateLimitService.php" "$BASE/application/common/service/"
cp -f "$PATCH/application/admin/controller/Domain.php" "$BASE/application/admin/controller/"
chown www:www \
  "$BASE/application/common/service/DomainDetectRateLimitService.php" \
  "$BASE/application/admin/controller/Domain.php"
php -l "$BASE/application/common/service/DomainDetectRateLimitService.php"
php -l "$BASE/application/admin/controller/Domain.php"
echo "检测频率限制部署完成"
