This commit is contained in:
2025-01-19 16:17:05 +03:00
parent 3d3414f01b
commit 306c1c4f37

View File

@@ -250,7 +250,7 @@ if ($rotateLogs) {
Write-Host "Removing old wDayzManager logs..."
$fileList = $null
$fileList = Get-ChildItem -Path $currentPath\Logs\*.log -Recurse | Where-Object { $_.LastWriteTime.Date -lt $date.AddDays( -3) }
$fileList = Get-ChildItem -Path $currentPath\Logs\*.log -Recurse | Where-Object { $_.LastWriteTime.Date -lt $date.AddDays( -2) }
# Write-Host $fileList -Separator "`n"
foreach ($file in $fileList) {
Remove-Item -Path $file
@@ -363,7 +363,7 @@ foreach ($srv in $servers) {
Copy-Item -Path "$($serverLocation)\ban.txt" -Destination "$($serverProfile)\BattlEye\bans.txt" -ErrorAction Stop
}
if (-not (Test-Path -Path "$($serverProfile)\BattlEye\BEServer_x64.cfg")) {
if (-not (Test-Path -Path "$($serverProfile)\BattlEye\BEServer_x64*.cfg")) {
Write-Host "Creating new file: `"$($serverProfile)\BattlEye\BEServer_x64.cfg`""
New-Item -ItemType File -Path "$($serverProfile)\BattlEye\BEServer_x64.cfg" | Out-Null
if (!$?) { Exit }