forked from CubeCoders/AMPTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arma3start.json
122 lines (120 loc) · 5.89 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'rm -f {{$FullBaseDir}}battleye/beserver*_active_*.cfg >/dev/null 2>&1'",
"SkipOnFailure":true
},
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C del /Q /F {{$FullBaseDir}}battleye\\beserver*_active_*.cfg > NUL 2>&1",
"SkipOnFailure":true
},
{
"UpdateStageName":"Copy Steamclient",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'mkdir -p arma3/linux ; \\cp -f arma3/linux64/steamclient.so arma3/linux/steamclient.so'",
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":"_x64",
"SkipOnFailure":false
},
{
"UpdateStageName":"Copy Steamclient",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'mkdir -p arma3/linux ; \\cp -f arma3/linux32/steamclient.so arma3/linux/steamclient.so'",
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":"",
"SkipOnFailure":false
},
{
"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/ {} + >/dev/null 2>&1; find \"$subdir/key\" -maxdepth 1 -mindepth 1 -type f -name \"*.bikey\" -exec \\cp -t keys/ {} + >/dev/null 2>&1; done; exit 0'",
"UpdateSourceConditionSetting":"ManageBikeys",
"UpdateSourceConditionValue":"true",
"SkipOnFailure":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",
"SkipOnFailure":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,
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":"_x64"
},
{
"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,
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":"_x64"
},
{
"UpdateStageName":"Headless Client Script Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc32.sh",
"UpdateSourceArgs":"runhc.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true,
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":""
},
{
"UpdateStageName":"Headless Client Script Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3runhc32.ps1",
"UpdateSourceArgs":"runhc.ps1",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true,
"UpdateSourceConditionSetting":"ServerExecutable",
"UpdateSourceConditionValue":""
},
{
"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}}\" {{HeadlessClientsStartLimit}} &'",
"RunInBackground":true,
"SkipOnFailure":true
},
{
"UpdateStageName":"Start Headless Clients",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C start powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"runhc.ps1\" {{HeadlessClientsNum}} {{$ApplicationIPBinding}} {{$GamePort}} \"{{password}}\" \"{{mod}}\" \"{{hc_parfile}}\" {{HeadlessClientsStartLimit}}",
"RunInBackground":true,
"SkipOnFailure":true
}
]