public async Task <ConnectionResult> StartMatchWithAuth(RconService.AuthType authType,
                                                                PavlovServer server,
                                                                Match match)
        {
            var connectionInfo = RconStatic.ConnectionInfoInternal(server.SshServer, authType, out var result);

            using var clientSsh  = new SshClient(connectionInfo);
            using var clientSftp = new SftpClient(connectionInfo);
            try
            {
                var listOfSteamIdentietiesWhichCanPlay = match.MatchTeam0SelectedSteamIdentities;
                listOfSteamIdentietiesWhichCanPlay.AddRange(match.MatchTeam1SelectedSteamIdentities);
                var list = new List <string>();
                if (listOfSteamIdentietiesWhichCanPlay.Count <= 0 && match.MatchSelectedSteamIdentities.Count <= 0)
                {
                    DataBaseLogger.LogToDatabaseAndResultPlusNotify("There are no team members so no match will start!",
                                                                    LogEventLevel.Fatal, _notifyService, result);
                    return(result);
                }


                if (match.MatchSelectedSteamIdentities.Count > 0)
                {
                    list = match.MatchSelectedSteamIdentities
                           .Select(x => Strings.Trim(x.SteamIdentityId)).ToList();
                }
                else if (listOfSteamIdentietiesWhichCanPlay.Count > 0)
                {
                    list = listOfSteamIdentietiesWhichCanPlay.Select(x => Strings.Trim(x.SteamIdentityId)).ToList();
                }

                list = list.Distinct().ToList();
                //GetAllAdminsForTheMatch
                var mods = new List <string>();
                //Todo what if the match is not team based? there are no mods or admins?
                mods = listOfSteamIdentietiesWhichCanPlay.Where(x => x.OverWriteRole == "Mod" || x.OverWriteRole == "Admin").Select(x => x.SteamIdentityId).ToList();


                //Write whitelist and set server settings


                RconStatic.WriteFile(server.SshServer,
                                     server.ServerFolderPath + FilePaths.WhiteList,
                                     list.ToArray(), _notifyService);
                RconStatic.WriteFile(server.SshServer,
                                     server.ServerFolderPath + FilePaths.ModList,
                                     mods.ToArray(), _notifyService);
                RconStatic.WriteFile(server.SshServer,
                                     server.ServerFolderPath + FilePaths.BanList,
                                     Array.Empty <string>(), _notifyService);


                var oldSettings = new PavlovServerGameIni();
                oldSettings.ReadFromFile(server, _notifyService);

                var serverSettings = new PavlovServerGameIni
                {
                    bEnabled        = true,
                    ServerName      = match.Name,
                    MaxPlayers      = match.PlayerSlots,
                    bSecured        = true,
                    bCustomServer   = true,
                    bWhitelist      = true,
                    RefreshListTime = 120,
                    LimitedAmmoType = 0,
                    TickRate        = 90,
                    TimeLimit       = match.TimeLimit,
                    Password        = "",
                    BalanceTableURL = "",
                    bVerboseLogging = true,
                    bCompetitive    = true,
                    MapRotation     = new List <PavlovServerGameIniMap>
                    {
                        new()
                        {
                            MapLabel = match.MapId,
                            GameMode = match.GameMode
                        }
                    },
                    ApiKey = oldSettings.ApiKey
                };
                var map = await _mapsService.FindOne(match.MapId.Replace("UGC", ""));

                serverSettings.SaveToFile(server, new[]
                {
                    new ServerSelectedMap()
                    {
                        Map      = map,
                        GameMode = match.GameMode
                    }
                }, _notifyService);
                await RconStatic.SystemDStart(server, _pavlovServerService);

                //StartWatchServiceForThisMatch
                match.Status = Status.StartetWaitingForPlayer;
                await Upsert(match);

                DataBaseLogger.LogToDatabaseAndResultPlusNotify("Start backgroundjob", LogEventLevel.Verbose,
                                                                _notifyService);

                BackgroundJob.Enqueue(
                    () => MatchInspector(match.Id)); // ChecjServerState
            }