forked from CubeCoders/AMPTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arma3start.json
120 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
[
{
"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\\\" -delete; IFS=\\\";\\\" read -ra subdirs_array <<< \\\"{{mod}};{{clientmod}}\\\"; for subdir in \\\"${subdirs_array[@]}\\\"; do [ -d \\\"$subdir/keys\\\" ] && \\cp \\\"$subdir/keys/\\\"*.bikey keys/ >/dev/null 2>&1; [ -d \\\"$subdir/key\\\" ] && \\cp \\\"$subdir/key/\\\"*.bikey keys/ >/dev/null 2>&1; done\"",
"UpdateSourceConditionSetting": "ManageBikeys",
"UpdateSourceConditionValue": "true",
"SkipOnFailure": true
},
{
"UpdateStageName": "Manage Bikeys",
"UpdateSourcePlatform": "Windows",
"UpdateSource": "Executable",
"UpdateSourceData": "powershell.exe",
"UpdateSourceArgs": "-NoProfile -Command \"$mods = '{{mod}};{{clientmod}}' -split ';'; Set-Location arma3\\233780; Remove-Item '.\\keys\\*.bikey' -Exclude 'a3.bikey' -Force -ErrorAction SilentlyContinue; $mods | ForEach-Object { if (Test-Path \\\".\\$_\\keys\\\") { Copy-Item -Path \\\".\\$_\\keys\\*.bikey\\\" -Destination '.\\keys' -Force -ErrorAction SilentlyContinue }; if (Test-Path \\\".\\$_\\key\\\") { Copy-Item -Path \\\".\\$_\\key\\*.bikey\\\" -Destination '.\\keys' -Force -ErrorAction SilentlyContinue } }\"",
"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
}
]