oclaw/scripts/stop_ops.ps1
oliver ba3836f00f 初始化:独立 oclaw 仓库首提交
- 在 oclaw/ 下重新初始化 Git 仓库
- 补齐子仓库 .gitignore,避免提交本地运行态数据(_local、node_modules、logs 等)
- 提交当前工程代码与配置

Made-with: Cursor
2026-04-24 22:31:22 +08:00

33 lines
736 B
PowerShell

param(
[switch]$Force = $false
)
$ErrorActionPreference = "Stop"
function Write-Step([string]$msg) {
Write-Host "==> $msg" -ForegroundColor Cyan
}
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
Set-Location $repoRoot
Write-Step "Project root: $repoRoot"
Write-Step "Stopping stack services..."
try {
python -m oclaw.ops stack down
Write-Host "Stack stopped." -ForegroundColor Green
} catch {
Write-Host "[WARN] stack down failed: $($_.Exception.Message)" -ForegroundColor Yellow
if (-not $Force) {
exit 1
}
}
Write-Step "Current status"
try {
python -m oclaw.ops stack status
} catch {
Write-Host "[WARN] Unable to read status after stop." -ForegroundColor Yellow
}