mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Wait for mongodb service running (#6030)
This commit is contained in:
committed by
GitHub
parent
f1bb031e43
commit
bf34dfb00a
@@ -14,6 +14,10 @@ $mongoPath = (Get-CimInstance Win32_Service -Filter "Name LIKE '$mongodbService'
|
|||||||
$mongoBin = Split-Path -Path $mongoPath.split('"')[1]
|
$mongoBin = Split-Path -Path $mongoPath.split('"')[1]
|
||||||
Add-MachinePathItem "$mongoBin"
|
Add-MachinePathItem "$mongoBin"
|
||||||
|
|
||||||
|
# Wait for mongodb service running
|
||||||
|
$svc = Get-Service $mongodbService
|
||||||
|
$svc.WaitForStatus('Running','00:01:00')
|
||||||
|
|
||||||
# Stop and disable mongodb service
|
# Stop and disable mongodb service
|
||||||
Stop-Service -Name $mongodbService
|
Stop-Service -Name $mongodbService
|
||||||
Set-Service $mongodbService -StartupType Disabled
|
Set-Service $mongodbService -StartupType Disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user