forked from CubeCoders/AMPTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharma3start.json
66 lines (66 loc) · 3.56 KB
/
arma3start.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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}};{{clientmod}}\" && for subdir in \"${subdirs_array[@]}\"; do find \"$subdir/keys\" -maxdepth 1 -mindepth 1 -type f -name \"*.bikey\" -exec \\cp -t keys/ {} +; find \"$subdir/key\" -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 \"$mods = '{{mod}};{{clientmod}}' -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 $mods) { Get-ChildItem -Path ('{0}\\keys' -f $a) -Filter '*.bikey' | Copy-Item -Destination 'keys' -Force ; Get-ChildItem -Path ('{0}\\key' -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}}\""
}
]