Fix the containerd service check

This commit is contained in:
“Ibrahim 2021-03-19 23:35:05 +00:00
parent ac5f05b374
commit bc3f6c1be9

View File

@ -1608,7 +1608,7 @@ function Configure_Containerd {
# Register if needed and start containerd service.
function Start_Containerd {
# Do the registration only if the containerd service does not exist.
if (Get-WMIObject -Class Win32_Service -Filter "Name='containerd'" -eq $null) {
if ((Get-WMIObject -Class Win32_Service -Filter "Name='containerd'") -eq $null) {
Log-Output "Creating containerd service"
& containerd.exe --register-service --log-file "${env:LOGS_DIR}/containerd.log"
}