This commit is contained in:
Greelan 2023-11-02 19:28:22 +11:00
parent 1132273791
commit fc5be0bb7a
3 changed files with 83 additions and 1 deletions

View File

@ -60,7 +60,7 @@ App.RCONHeartbeatMinutes=0.5
App.RCONHeartbeatCommand=ping
App.TelnetLoginFormat={0}
App.UpdateSources=@IncludeJson[arma3updates.json]
App.PreStartStages=[{"UpdateStageName":"Delete Active File","UpdateSourcePlatform":"Linux","UpdateSource":"Executable","UpdateSourceData":"/bin/bash","UpdateSourceArgs":"-c 'rm -f {{$FullBaseDir}}battleye/beserver_x64_active_*.cfg'"},{"UpdateStageName":"Delete Active File","UpdateSourcePlatform":"Windows","UpdateSource":"Executable","UpdateSourceData":"cmd.exe","UpdateSourceArgs":"/C del /Q /F {{$FullBaseDir}}battleye\\beserver_x64_active_*.cfg"},{"UpdateStageName":"Headless Client Script Download","UpdateSourcePlatform":"Linux","UpdateSource":"FetchURL","UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc.sh","UpdateSourceArgs":"runhc.sh","UpdateSourceTarget":"{{$FullInstanceDir}}","OverwriteExistingFiles":true},{"UpdateStageName":"Headless Client Script Download","UpdateSourcePlatform":"Windows","UpdateSource":"FetchURL","UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc.ps1","UpdateSourceArgs":"runhc.ps1","UpdateSourceTarget":"{{$FullInstanceDir}}","OverwriteExistingFiles":true},{"UpdateStageName":"Start Headless Clients","UpdateSourcePlatform":"Linux","UpdateSource":"Executable","UpdateSourceData":"/bin/bash","UpdateSourceArgs":"-c 'chmod +x ./runhc.sh; ./runhc.sh {{HeadlessClientsNum}} {{$ApplicationIPBinding}} {{$GamePort}} \"{{password}}\" \"{{mod}}\" \"{{hc_parfile}}\" &'"},{"UpdateStageName":"Start Headless Clients","UpdateSourcePlatform":"Windows","UpdateSource":"Executable","UpdateSourceData":"cmd.exe","UpdateSourceArgs":"/C start powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File \"runhc.ps1\" {{HeadlessClientsNum}} {{$ApplicationIPBinding}} {{$GamePort}} \"{{password}}\" \"{{mod}}\" \"{{hc_parfile}}\""}]
App.PreStartStages=@IncludeJson[arma3start.json]
App.Compatibility=None
App.SteamUpdateAnonymousLogin=False
App.SteamForceLoginPrompt=True

View File

@ -149,6 +149,22 @@
"DefaultValue":"",
"EnumValues":{}
},
{
"DisplayName":"Manage Bikeys",
"Category":"Arma Server Settings",
"Description":"If enabled, the bikey files for each of the mods specified in Load Mods will be copied to the 'keys' directory on server start, to enable signature verification. All existing keys in that directory (other than the default a3.bikey) will be deleted",
"Keywords":"mods,addons,bikeys",
"FieldName":"ManageBikeys",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"ManageBikeys",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"False":"false",
"True":"true"
}
},
{
"DisplayName":"Server/RCON IP Binding",
"Category":"Arma Server Settings",

66
arma3start.json Normal file
View File

@ -0,0 +1,66 @@
[
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'rm -f {{$FullBaseDir}}battleye/beserver_x64_active_*.cfg'"
},
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C del /Q /F {{$FullBaseDir}}battleye\\beserver_x64_active_*.cfg"
},
{
"UpdateStageName":"Manage Bikeys",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'cd arma3/233780; find keys/ -name \"*.bikey\" ! -name \"a3.bikey\" -exec rm {} +; IFS=\";\" read -ra subdirs_array <<< \"{{mod}}\" && for subdir in \"${subdirs_array[@]}\"; do find \"$subdir/keys\" -maxdepth 1 -mindepth 1 -type f -name \"*.bikey\" -exec \\cp -t keys/ {} +; done'",
"UpdateSourceConditionSetting":"ManageBikeys",
"UpdateSourceConditionValue":"true"
},
{
"UpdateStageName":"Manage Bikeys",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C start powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -Command \"$mod = '{{mod}}' -split ';'; Set-Location arma3\\233780; Get-ChildItem -Path 'keys' -Filter '*.bikey' | ForEach-Object { if ($_.Name -ne 'a3.bikey') { Remove-Item -Path $_.FullName -Force } }; foreach ($a in $mod) { Get-ChildItem -Path ('{0}\\keys' -f $a) -Filter '*.bikey' | Copy-Item -Destination 'keys' -Force }\"",
"UpdateSourceConditionSetting":"ManageBikeys",
"UpdateSourceConditionValue":"true"
},
{
"UpdateStageName":"Headless Client Script Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc.sh",
"UpdateSourceArgs":"runhc.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"Headless Client Script Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc.ps1",
"UpdateSourceArgs":"runhc.ps1",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"Start Headless Clients",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'chmod +x ./runhc.sh; ./runhc.sh {{HeadlessClientsNum}} {{$ApplicationIPBinding}} {{$GamePort}} \"{{password}}\" \"{{mod}}\" \"{{hc_parfile}}\" &'"
},
{
"UpdateStageName":"Start Headless Clients",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C start powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File \"runhc.ps1\" {{HeadlessClientsNum}} {{$ApplicationIPBinding}} {{$GamePort}} \"{{password}}\" \"{{mod}}\" \"{{hc_parfile}}\""
}
]