Checking sudo docker and status of the service

Checking presence Sudo and Docker on the server.
Checking the status of the Docker service.
This commit is contained in:
lunardunno 2025-03-18 16:12:20 +04:00
parent ae32b26b83
commit ecf5b7c68f
4 changed files with 8 additions and 4 deletions

View file

@ -409,8 +409,10 @@ ErrorCode ServerController::installDockerWorker(const ServerCredentials &credent
qDebug().noquote() << "ServerController::installDockerWorker" << stdOut;
if (stdOut.contains("lock"))
return ErrorCode::ServerPacketManagerError;
if (stdOut.contains("command not found"))
if (stdOut.contains("sudo:") && stdOut.contains("not found"))
return ErrorCode::ServerDockerFailedError;
if (stdOut.contains("Failed docker status"))
return ErrorCode::ServerDockerStatusNotActive;
return error;
}