dev
This commit is contained in:
19
start_domain_web_background.ps1
Normal file
19
start_domain_web_background.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$webRoot = Join-Path $root 'domain-web'
|
||||
$logDir = Join-Path $webRoot 'runtime\logs'
|
||||
$stdoutLog = Join-Path $logDir 'domain-web.stdout.log'
|
||||
$stderrLog = Join-Path $logDir 'domain-web.stderr.log'
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $logDir | Out-Null
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File (Join-Path $root 'stop_domain_web.ps1') | Out-Null
|
||||
|
||||
$command = "& '" + (Join-Path $root 'start_domain_web.ps1') + "'"
|
||||
Start-Process -FilePath 'powershell' `
|
||||
-ArgumentList '-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', $command `
|
||||
-WorkingDirectory $webRoot `
|
||||
-RedirectStandardOutput $stdoutLog `
|
||||
-RedirectStandardError $stderrLog
|
||||
|
||||
Write-Output "domain-web 已后台启动(0.0.0.0:3200),日志:$stdoutLog / $stderrLog"
|
||||
Reference in New Issue
Block a user