初始化系统融合软件代码仓库
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
[CmdletBinding()]
|
||||
param([string]$InstallRoot = (Split-Path -Parent $PSScriptRoot))
|
||||
. (Join-Path $PSScriptRoot 'Common.ps1')
|
||||
$root = [System.IO.Path]::GetFullPath($InstallRoot)
|
||||
$processFile = Join-Path $root 'service-process.json'
|
||||
if (-not (Test-Path -LiteralPath $processFile)) { Write-Output '此部署目录没有启动记录。'; return }
|
||||
$record = Get-Content -LiteralPath $processFile -Raw | ConvertFrom-Json
|
||||
$process = Get-XtrhOwnedProcess -InstallRoot $root -Record $record
|
||||
if ($process) { Stop-Process -Id $process.Id -Force }
|
||||
Remove-Item -LiteralPath $processFile -Force
|
||||
Write-Output '此部署实例已停止;数据、身份和配置均保留。'
|
||||
Reference in New Issue
Block a user