launcher script, assumes bash
This commit is contained in:
+36
-2
@@ -1,3 +1,7 @@
|
|||||||
|
How to set up a server for local testing if you are running linux.
|
||||||
|
|
||||||
|
At the end you'll have a setup that you copy the mission to, and use a repo html folder to load the mods for you.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
## Install Arma server through steam.
|
## Install Arma server through steam.
|
||||||
Use the linux version, don't use a proton compatibility layer.
|
Use the linux version, don't use a proton compatibility layer.
|
||||||
@@ -6,7 +10,7 @@ Use the linux version, don't use a proton compatibility layer.
|
|||||||
|
|
||||||
[Wiki Example](https://community.bistudio.com/wiki/Arma_3:_Server_Config_File#Example_Configuration_File)
|
[Wiki Example](https://community.bistudio.com/wiki/Arma_3:_Server_Config_File#Example_Configuration_File)
|
||||||
|
|
||||||
Disable signature verification and battleye, and add an admin password so you can change mission without the voting timer.
|
Disable signature verification and battleye, and add an admin password so you can change mission without the voting timer. Save as server.cfg in the server folder.
|
||||||
|
|
||||||
## Symlink the client workshop folder.
|
## Symlink the client workshop folder.
|
||||||
|
|
||||||
@@ -14,10 +18,40 @@ While in your server folder eg ```/home/MYUSERNAME/.local/share/Steam/steamapps/
|
|||||||
|
|
||||||
```ln -s /home/MYUSERNAME/.local/share/Steam/steamapps/workshop/content/107410 mods```
|
```ln -s /home/MYUSERNAME/.local/share/Steam/steamapps/workshop/content/107410 mods```
|
||||||
|
|
||||||
|
This adds a folder that links straight to the workshop folder.
|
||||||
|
|
||||||
## Create the launcher script
|
## Create the launcher script
|
||||||
Create a new shell script called launch_from_html.sh in the arma server folder with the contents
|
Create a new shell script called launch_from_html.sh in the arma server folder with the contents
|
||||||
|
|
||||||
```TBA```
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "This script is to be launched with an html repo file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# id= precedes match, match is any number of digits, " follows match
|
||||||
|
mod_list=$(grep -P -o "(?<=id\=)[0-9]*(?=\")" $1)
|
||||||
|
|
||||||
|
# build mod parameter
|
||||||
|
modstring="\"-mod="
|
||||||
|
first_mod=true
|
||||||
|
for r in $mod_list
|
||||||
|
do
|
||||||
|
if [ "$first_mod" == true ]; then
|
||||||
|
modstring=$modstring"mods/"$r
|
||||||
|
first_mod=false
|
||||||
|
else
|
||||||
|
modstring=$modstring";mods/"$r
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
modstring=$modstring"\""
|
||||||
|
|
||||||
|
scriptdir=$(dirname "$0")
|
||||||
|
cd "$scriptdir"
|
||||||
|
./arma3server_x64 -config=server.cfg $modstring
|
||||||
|
sleep 5
|
||||||
|
```
|
||||||
|
|
||||||
Make it executable. In mint, right click, properties, check allow executing as program, and close. ```chmod +x launch_from_html``` is terminal version of this.
|
Make it executable. In mint, right click, properties, check allow executing as program, and close. ```chmod +x launch_from_html``` is terminal version of this.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user