Compare commits
6 Commits
7ff8e74f24
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 010aecde5f | |||
| 306c1c4f37 | |||
| 3d3414f01b | |||
| 6f6d415a65 | |||
| 1fdce8dbaa | |||
| fab00eecdb |
19
README.md
19
README.md
@@ -1,19 +0,0 @@
|
||||
# wDayzManager
|
||||
|
||||
1. Скачайте SteamCMD (https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip) и распакуйте архив в нужную папку. Например `Z:\SteamCMD`.
|
||||
1.1 Запустите `steamcmd.exe`.
|
||||
1.2 После обновления себя и появления приглашения `Steam>` ввести команду `login <имя_пользователя>`.
|
||||
1.3 Затем введите свой пароль. Если Steam Guard активирован на учетной записи пользователя, проверьте свой адрес электронной почты на наличие кода доступа Steam Guard и введите его. Это требуется только при первом входе в систему. Вы должны увидеть сообщение о том, что вы успешно вошли в систему с помощью своей учетной записи.
|
||||
|
||||
2. Если вы будете использовать `BEC` (Battleye Extended Control) - скачайте его (https://github.com/TheGamingChief/BattlEye-Extended-Controls) и распакуйте в нужную папку.
|
||||
|
||||
3. Скачайте wDayzManager () и распакуйте архив в нужную папку. Например `Z:\Servers\wDayzManager`.
|
||||
3.1 Запустите командную строку от имени администратора. Для этого в Windows 10 нажмите правой кнопкой мыши на меню Пуск и выберите пункт "Командная строка (администратор)".
|
||||
3.2 Перейдите в папку в которую вы распаковали wDayzManager (`cd /d Z:\Servers\wDayzManager`) и запустите файл `Start.bat`.
|
||||
3.3 У вас должна появиться подпапка Logs в которой будет находиться log-файл с сообщением о том, что файл `wDayzManager.ini` не найден и был создан новый.
|
||||
3.4 Откройте файл wDayzManager.ini в любом текстовом редакторе (но не Microsoft Word и ему подобных!) и отредактируйте его как вам необходимо. Описание настроек будет ниже.
|
||||
3.5 Ещё раз запустите файл `Start.bat`, но уже с параметром `/u`. (`Start.bat /u`).
|
||||
3.6 Дождитесь окончания скачивания файлов сервера и модов, после чего проверьте log-файл wDayzManager на наличие ошибок или предупреждений.
|
||||
3.7 Отредактируйте конфигурационные файлы серверов (по-умолчанию `serverDZ.cfg`).
|
||||
3.8 Если вы будете использовать `BEC` (Battleye Extended Control), то отредактируйте его конфигурационные файлы.
|
||||
3.9 Если вы будете использовать какие-либо инструменты администратора (`CommunityOnlineTools` или `VPPAdminTools` или подобные) не забудьте также настроить и их.
|
||||
@@ -44,6 +44,7 @@ updateHour=0
|
||||
@CnG_UAZ_31514=3160244059
|
||||
|
||||
[ServerMods]
|
||||
@AntiRaid=1750367340
|
||||
@SurvivorMissions=1988925918
|
||||
|
||||
[Server-1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# wDayzManager v0.8
|
||||
# wDayzManager v0.9
|
||||
# Copyright (c) 2024 Vladislav Salikov aka W0LF aka 'dreamforce'
|
||||
# https://github.com/dreamforceinc
|
||||
# Required module: PSIni
|
||||
@@ -22,9 +22,10 @@ Param (
|
||||
################################################################ [ !!! DON'T EDIT BELOW !!! ] #################################################################
|
||||
|
||||
[string]$myName = "wDayzManager"
|
||||
[string]$myVersion = "v0.8"
|
||||
[string]$myVersion = "v0.9"
|
||||
[string]$iniFile = $myName + ".ini"
|
||||
[string]$steamScript = $myName + ".txt"
|
||||
$Error.Clear()
|
||||
|
||||
if (($init -eq $true) -and ($update -eq $true)) {
|
||||
Write-Error "Only one parameter is accepted - either 'Init' or 'Update'."
|
||||
@@ -106,7 +107,6 @@ $date = Get-Date
|
||||
|
||||
$date2 = Get-Date -Format 's' | ForEach-Object { $_ -replace 'T', ' ' }
|
||||
Write-Host "$($date2) Starting $($myName) $($myVersion) script"
|
||||
Write-Host "init = $($init), update = $($update), noDelete = $($noDelete)"
|
||||
|
||||
$ini = $config = $servers = $clientMods = $serverMods = $steamProcess = $null
|
||||
$modNI = $modNS = $namalskMission = $pathNamalskMission = $null
|
||||
@@ -147,10 +147,6 @@ foreach ($mod in $ini.ServerMods.GetEnumerator()) {
|
||||
}
|
||||
}
|
||||
|
||||
function Update {
|
||||
|
||||
}
|
||||
|
||||
switch ($updatePeriod) {
|
||||
D { if ($currentHour -eq $updateHour) { $update = $true } }
|
||||
W { if (($currentDayOfWeek -eq $updateDay) -and ($currentHour -eq $updateHour)) { $update = $true } }
|
||||
@@ -158,6 +154,8 @@ switch ($updatePeriod) {
|
||||
default { $update = $false }
|
||||
}
|
||||
|
||||
Write-Host "Init = $($init), Update = $($update), noDelete = $($noDelete)"
|
||||
|
||||
if ($update) {
|
||||
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Write-Warning "You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!"
|
||||
@@ -252,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
|
||||
@@ -278,6 +276,7 @@ if (-not ([string]::IsNullOrEmpty($becLocation))) {
|
||||
if (-not (Test-Path -Path "$($becLocation)\")) {
|
||||
New-Item -ItemType Directory -Path "$($becLocation)\" | Out-Null
|
||||
New-Item -ItemType Directory -Path "$($becLocation)\Config\" | Out-Null
|
||||
New-Item -ItemType Directory -Path "$($becLocation)\Log\" | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,10 +353,26 @@ foreach ($srv in $servers) {
|
||||
Exit
|
||||
}
|
||||
|
||||
if (-not (Test-Path -Path "$($serverProfile)\BattlEye\")) {
|
||||
Write-Host "Creating new folder: `"$($serverProfile)\BattlEye\`""
|
||||
New-Item -ItemType Directory -Path "$($serverProfile)\BattlEye\" | Out-Null
|
||||
}
|
||||
|
||||
if (-not (Test-Path -Path "$($serverProfile)\BattlEye\bans.txt")) {
|
||||
Write-Host "Copying file from `"$($serverLocation)\ban.txt`" to `"$($serverProfile)\BattlEye\bans.txt`""
|
||||
Copy-Item -Path "$($serverLocation)\ban.txt" -Destination "$($serverProfile)\BattlEye\bans.txt" -ErrorAction Stop
|
||||
}
|
||||
|
||||
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 }
|
||||
[int]$rconPort = [int]$serverPort + 5
|
||||
$content = "RConPassword ChangeMe123`r`nRConPort $($rconPort)`r`nRestrictRCon 0"
|
||||
Add-Content -Path "$($serverProfile)\BattlEye\BEServer_x64.cfg" -Value $content -Encoding ASCII
|
||||
$content = $null
|
||||
}
|
||||
|
||||
$bec = "`"$($becLocation)\bec.exe`""
|
||||
$becArguments = "-f `"$($instance).cfg`" --dsc"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user