[ { "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' -and -not ($_.Name -like '*a3.bikey*')) { Remove-Item -LiteralPath $_.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}}\"" } ]