From e818b5aee066d2137e1c4d6a7f6eb87f637a7d79 Mon Sep 17 00:00:00 2001 From: via <3+via@devteam.austac.net> Date: Fri, 26 Jun 2026 06:04:19 +0000 Subject: [PATCH] launcher script, assumes bash --- linuxtestserver.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/linuxtestserver.md b/linuxtestserver.md index e28f1eb..a00d048 100644 --- a/linuxtestserver.md +++ b/linuxtestserver.md @@ -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 ## Install Arma server through steam. 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) -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. @@ -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``` +This adds a folder that links straight to the workshop folder. + ## Create the launcher script 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.