Files
Nexus/scripts/batch_detect_target_path.sh
T
Nexus Agent 29b053b3c0 fix(sync): 未设路径推送回退 /www/wwwroot,UI 判定不变
空或占位 /www/wwwroot 仍算「未设路径」;rsync 推送/预览/验证改用 resolve_push_target_path,并新增批量 detect-path 脚本。
2026-06-11 23:42:58 +08:00

18 lines
635 B
Bash

#!/usr/bin/env bash
# Batch detect target_path on「未设路径」servers (SSH find workerman.bat).
#
# Usage:
# bash scripts/batch_detect_target_path.sh --unset-only
# bash scripts/batch_detect_target_path.sh --unset-only --dry-run
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SECRETS="${ROOT}/deploy/nexus-1panel.secrets.sh"
if [[ -f "$SECRETS" ]]; then
# shellcheck disable=SC1090
source "$SECRETS"
fi
PYTHON="${ROOT}/.venv/bin/python"
[[ -x "$PYTHON" ]] || PYTHON="${ROOT}/venv/bin/python"
[[ -x "$PYTHON" ]] || PYTHON=python3
exec "$PYTHON" "${ROOT}/scripts/batch_detect_target_path.py" "$@"