From 691e137240514905ed0b31a66a63ceb1f93b23cd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 9 May 2015 22:57:19 +0100 Subject: [PATCH] arma 3 updated port requirement See issue https://github.com/dgibbs64/linuxgsm/issues/325 --- .gitignore | 1 + Arma3/arma3server | 3 ++- functions/fn_details_config | 6 ++++-- functions/fn_start | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3997beadf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.db \ No newline at end of file diff --git a/Arma3/arma3server b/Arma3/arma3server index feab9e5d1..cf39d25d1 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -18,11 +18,12 @@ steamuser="username" steampass="password" # Start Variables +port="2302" ip="0.0.0.0" updateonstart="no" fn_parms(){ -parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}" +parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}" } #### Advanced Variables #### diff --git a/functions/fn_details_config b/functions/fn_details_config index f63a0a548..59bcd6aa5 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -2,7 +2,7 @@ # LGSM fn_details_config function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 160415 +# Version: 090515 # Description: Gets specific details from config files. @@ -15,7 +15,9 @@ elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "realvirtuality" ]; then servername=$(grep -s hostname "${servercfgfullpath}"| grep -v //|sed -e 's/\//g'| tr -d '=\"; ') - port=$(grep -s serverport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) + if [ -z "${port}" ]; then + port=$(grep -s serverport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) + fi queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) masterport=$(grep -s steamport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) diff --git a/functions/fn_start b/functions/fn_start index 7bed76b69..d679d2e6d 100644 --- a/functions/fn_start +++ b/functions/fn_start @@ -191,4 +191,4 @@ if [ "${gamename}" == "Teamspeak 3" ]; then fn_start_teamspeak3 else fn_start_tmux -fi +fi \ No newline at end of file