* Added new server Rising World * Added new server ET: Legacy * Added support for node-gamedig * Updated Factorio to glibc 2.18 * Changed apt-get to apt * Changed many sleep timers from 1 second to 0.5 to speed up LinuxGSM * Fix for issue #1784 Tmux closing wrong session * Fixed dependency requirements for CoD 2 and CoD:UO #1866 * Discord now uses external IP over standard IP * Code tidy/improvements with guidance from Shellcheck * Added development command query-raw * Added development command clear-functions * Added development log dev-debug-function-order.log * Added fctrserver to Travis CI tests * Updates to GitHub Issues; Added bots and updated templated * Fixed waffle.io button no longer working * Corrected Query Port for UT3 (Query Port does not work btw)pull/1874/head
@ -0,0 +1,15 @@ |
|||
# Configuration for request-info - https://github.com/behaviorbot/request-info |
|||
|
|||
# *Required* Comment to reply with |
|||
requestInfoReplyComment: > |
|||
We require more information for this issue. |
|||
https://linuxgsm.com/support/#guide |
|||
|
|||
# *OPTIONAL* default titles to check against for lack of descriptiveness |
|||
# MUST BE ALL LOWERCASE |
|||
#requestInfoDefaultTitles: |
|||
# - update readme.md |
|||
# - updates |
|||
|
|||
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given |
|||
requestInfoLabelToAdd: Status: needs more info |
@ -0,0 +1,15 @@ |
|||
# Configuration for support-requests - https://github.com/dessant/support-requests |
|||
|
|||
# Label used to mark issues as support requests |
|||
supportLabel: Type: support |
|||
# Comment to post on issues marked as support requests. Add a link |
|||
# to a support page, or set to `false` to disable |
|||
supportComment: > |
|||
We use the issue tracker exclusively for bug reports and feature requests. |
|||
However, this issue appears to be a support request. Please use our |
|||
support channels to get help with the project. |
|||
https://linuxgsm.com/support/ |
|||
# Whether to close issues marked as support requests |
|||
close: true |
|||
# Whether to lock issues marked as support requests |
|||
lock: false |
@ -0,0 +1,21 @@ |
|||
# Configuration for welcome - https://github.com/behaviorbot/welcome |
|||
|
|||
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome |
|||
|
|||
# Comment to be posted to on first time issues |
|||
newIssueWelcomeComment: > |
|||
Thanks for opening your first issue. Be sure to follow the issue template! and guide for posting. https://linuxgsm.com/support/#guide |
|||
|
|||
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome |
|||
|
|||
# Comment to be posted to on PRs from first time contributors in your repository |
|||
newPRWelcomeComment: > |
|||
Thanks for opening this pull request! Please check out our contributing guidelines. |
|||
|
|||
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge |
|||
|
|||
# Comment to be posted to on pull requests merged by a first time user |
|||
firstPRMergeComment: > |
|||
Congrats on merging your first pull request! Thank you for supporting LinuxGSM! |
|||
|
|||
# It is recommend to include as many gifs and emojis as possible |
@ -1,8 +1,17 @@ |
|||
Please select the "Preview" tab above to view this message correctly. |
|||
|
|||
Please note that this is an issue tracker for **LinuxGSM** related bugs and feature requests and **not** for the games themselves. |
|||
Follow **[this guide](https://linuxgsm.com/support/#guide)** to make sure you post the correct info. |
|||
For general support visit the **[steam group](https://linuxgsm.com/steam)** |
|||
|
|||
**Therefore personal server issues on GitHub will be closed without a kiss.** |
|||
GitHub is **ONLY** for: |
|||
* LinuxGSM bugs |
|||
* feature suggestions |
|||
* code contributions |
|||
|
|||
Please follow **[this article](https://github.com/GameServerManagers/LinuxGSM/wiki/Support)** for optimal assistance |
|||
and do not forget to remove this text before opening the issue. |
|||
GitHub is **NOT** for: |
|||
* General support |
|||
* Specific game server issues (e.g CS:GO, TF2) |
|||
* Dedicated server issues (e.g Ubuntu, CentOS) |
|||
* Anything not directly related to LinuxGSM development |
|||
|
|||
**Any general support issues on GitHub will be closed.** |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
@ -1,3 +0,0 @@ |
|||
# LinuxGSM - Official Logos |
|||
For Reference the original design can be found here. |
|||
http://twolofbees.com/artwork.php?iid=870 |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 1008 B |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 48 KiB |
@ -0,0 +1,104 @@ |
|||
################################## |
|||
######## Default Settings ######## |
|||
################################## |
|||
# DO NOT EDIT WILL BE OVERWRITTEN! |
|||
# Copy settings from here and use them in either |
|||
# common.cfg - applies settings to every instance |
|||
# [instance].cfg - applies settings to a specific instance |
|||
|
|||
#### Server Settings #### |
|||
|
|||
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters |
|||
fn_parms(){ |
|||
parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" |
|||
} |
|||
|
|||
#### LinuxGSM Settings #### |
|||
|
|||
## Notification Alerts |
|||
# (on|off) |
|||
|
|||
# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info |
|||
postalert="off" |
|||
postdays="7" |
|||
posttarget="https://hastebin.com" |
|||
|
|||
# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord |
|||
discordalert="off" |
|||
discordwebhook="webhook" |
|||
|
|||
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email |
|||
emailalert="off" |
|||
email="[email protected]" |
|||
emailfrom="" |
|||
|
|||
# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT |
|||
iftttalert="off" |
|||
ifttttoken="accesstoken" |
|||
iftttevent="linuxgsm_alert" |
|||
|
|||
# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun |
|||
mailgunalert="off" |
|||
mailguntoken="accesstoken" |
|||
mailgundomain="example.com" |
|||
mailgunemailfrom="[email protected]" |
|||
mailgunemail="[email protected]" |
|||
|
|||
# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet |
|||
pushbulletalert="off" |
|||
pushbullettoken="accesstoken" |
|||
channeltag="" |
|||
|
|||
# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover |
|||
pushoveralert="off" |
|||
pushovertoken="accesstoken" |
|||
|
|||
# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram |
|||
telegramalert="off" |
|||
telegramtoken="accesstoken" |
|||
telegramchatid="" |
|||
|
|||
## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup |
|||
maxbackups="4" |
|||
maxbackupdays="30" |
|||
stoponbackup="on" |
|||
|
|||
## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging |
|||
consolelogging="on" |
|||
logdays="7" |
|||
|
|||
#### LinuxGSM Advanced Settings #### |
|||
|
|||
## LinuxGSM Server Details |
|||
# Do not edit |
|||
gamename="ET: Legacy" |
|||
engine="idtech3" |
|||
|
|||
#### Directories #### |
|||
# Edit with care |
|||
|
|||
## Server Specific Directories |
|||
systemdir="${serverfiles}" |
|||
executabledir="${systemdir}" |
|||
executable="./etlded" |
|||
servercfg="${servicename}.cfg" |
|||
servercfgdefault="server.cfg" |
|||
servercfgdir="${systemdir}/etmain" |
|||
servercfgfullpath="${servercfgdir}/${servercfg}" |
|||
|
|||
## Backup Directory |
|||
backupdir="${rootdir}/backups" |
|||
|
|||
## Logging Directories |
|||
logdir="${rootdir}/log" |
|||
gamelogdir="${serverfiles}/Logs" |
|||
lgsmlogdir="${logdir}/script" |
|||
consolelogdir="${logdir}/console" |
|||
lgsmlog="${lgsmlogdir}/${servicename}-script.log" |
|||
consolelog="${consolelogdir}/${servicename}-console.log" |
|||
alertlog="${lgsmlogdir}/${servicename}-alert.log" |
|||
postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" |
|||
|
|||
## Logs Naming |
|||
lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" |
|||
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" |
@ -0,0 +1,118 @@ |
|||
################################## |
|||
######## Default Settings ######## |
|||
################################## |
|||
# DO NOT EDIT WILL BE OVERWRITTEN! |
|||
# Copy settings from here and use them in either |
|||
# common.cfg - applies settings to every instance |
|||
# [instance].cfg - applies settings to a specific instance |
|||
|
|||
#### Server Settings #### |
|||
|
|||
## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters |
|||
javaram="2048" # -Xmx$2048M |
|||
|
|||
## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters |
|||
fn_parms(){ |
|||
parms="" |
|||
} |
|||
|
|||
#### LinuxGSM Settings #### |
|||
|
|||
## Notification Alerts |
|||
# (on|off) |
|||
|
|||
# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info |
|||
postalert="off" |
|||
postdays="7" |
|||
posttarget="https://hastebin.com" |
|||
|
|||
# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord |
|||
discordalert="off" |
|||
discordwebhook="webhook" |
|||
|
|||
# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email |
|||
emailalert="off" |
|||
email="[email protected]" |
|||
emailfrom="" |
|||
|
|||
# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT |
|||
iftttalert="off" |
|||
ifttttoken="accesstoken" |
|||
iftttevent="linuxgsm_alert" |
|||
|
|||
# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun |
|||
mailgunalert="off" |
|||
mailguntoken="accesstoken" |
|||
mailgundomain="example.com" |
|||
mailgunemailfrom="[email protected]" |
|||
mailgunemail="[email protected]" |
|||
|
|||
# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet |
|||
pushbulletalert="off" |
|||
pushbullettoken="accesstoken" |
|||
channeltag="" |
|||
|
|||
# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover |
|||
pushoveralert="off" |
|||
pushovertoken="accesstoken" |
|||
|
|||
# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram |
|||
telegramalert="off" |
|||
telegramtoken="accesstoken" |
|||
telegramchatid="" |
|||
|
|||
## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update |
|||
updateonstart="off" |
|||
|
|||
## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup |
|||
maxbackups="4" |
|||
maxbackupdays="30" |
|||
stoponbackup="on" |
|||
|
|||
## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging |
|||
consolelogging="on" |
|||
logdays="7" |
|||
|
|||
#### LinuxGSM Advanced Settings #### |
|||
|
|||
## SteamCMD Settings |
|||
# Server appid |
|||
appid="339010" |
|||
# Steam App Branch Select |
|||
# Allows to opt into the various Steam app branches. Default branch is "". |
|||
# Example: "-beta latest_experimental" |
|||
branch="" |
|||
|
|||
## LinuxGSM Server Details |
|||
# Do not edit |
|||
gamename="Rising World" |
|||
engine="risingworld" |
|||
|
|||
#### Directories #### |
|||
# Edit with care |
|||
|
|||
## Server Specific Directories |
|||
systemdir="${serverfiles}" |
|||
executabledir="${serverfiles}" |
|||
executable="java -Xmx${javaram}m -jar ${serverfiles}/server.jar" |
|||
servercfg="server.properties" |
|||
servercfgdefault="server.properties" |
|||
servercfgdir="${serverfiles}" |
|||
servercfgfullpath="${servercfgdir}/${servercfg}" |
|||
|
|||
## Backup Directory |
|||
backupdir="${rootdir}/backups" |
|||
|
|||
## Logging Directories |
|||
logdir="${rootdir}/log" |
|||
gamelogdir="${systemdir}/logs" |
|||
lgsmlogdir="${logdir}/script" |
|||
consolelogdir="${logdir}/console" |
|||
lgsmlog="${lgsmlogdir}/${servicename}-script.log" |
|||
consolelog="${consolelogdir}/${servicename}-console.log" |
|||
alertlog="${lgsmlogdir}/${servicename}-alert.log" |
|||
postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log" |
|||
|
|||
## Logs Naming |
|||
lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" |
|||
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" |
Can't render this file because it has a wrong number of fields in line 66.
|
@ -0,0 +1,14 @@ |
|||
#!/bin/bash |
|||
# command_dev_clear_functions.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://linuxgsm.com |
|||
# Description: Deletes the contents of the functions dir. |
|||
|
|||
echo "=================================" |
|||
echo "Clear Functions" |
|||
echo "=================================" |
|||
echo "" |
|||
if fn_prompt_yn "Do you want to delete all functions?" Y; then |
|||
rm -rfv "${functionsdir}/*" |
|||
fi |
|||
core_exit.sh |
@ -0,0 +1,40 @@ |
|||
#!/bin/bash |
|||
# command_dev_query_raw.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://gameservermanagers.com |
|||
# Description: Raw gamedig output of the server. |
|||
|
|||
echo "=================================" |
|||
echo "Gamedig Raw Output" |
|||
echo "=================================" |
|||
echo"" |
|||
if [ ! "$(command -v gamedig 2>/dev/null)" ]; then |
|||
fn_print_failure_nl "gamedig not installed" |
|||
fi |
|||
if [ ! "$(command -v jq 2>/dev/null)" ]; then |
|||
fn_print_failure_nl "jq not installed" |
|||
fi |
|||
|
|||
|
|||
info_config.sh |
|||
info_parms.sh |
|||
if [ "${engine}" == "idtech3_ql" ]; then |
|||
local engine="quakelive" |
|||
elif [ "${gamename}" == "Killing Floor 2" ]; then |
|||
local engine="unreal4" |
|||
fi |
|||
|
|||
query_gamedig.sh |
|||
echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${port}\"|jq" |
|||
echo"" |
|||
echo "${gamedigraw}" | jq |
|||
echo"" |
|||
echo "=================================" |
|||
echo "gsquery Raw Output" |
|||
echo "=================================" |
|||
echo"" |
|||
echo "./query_gsquery.py -a \"${ip}\" -p \"${port}\" -e \"${engine}\"" |
|||
if [ ! -f "${functionsdir}/query_gsquery.py" ]; then |
|||
fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" |
|||
fi |
|||
"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${port}" -e "${engine}" |
@ -0,0 +1,10 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM fix_rw.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://linuxgsm.com |
|||
# Description: Resolves startup issue with Rising World |
|||
|
|||
local commandname="FIX" |
|||
local commandaction="Fix" |
|||
|
|||
export LD_LIBRARY_PATH="${serverfiles}/linux64:${serverfiles}:$LD_LIBRARY_PATH" |
@ -0,0 +1,20 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM fix_ut2.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://linuxgsm.com |
|||
# Description: Resolves various issues with configs in Unreal Tournament 3. |
|||
|
|||
local commandname="FIX" |
|||
local commandaction="Fix" |
|||
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
|
|||
fn_parms(){ |
|||
parms="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${servicename} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" |
|||
} |
|||
|
|||
fn_print_information "starting ${gamename} server to generate configs." |
|||
sleep 1 |
|||
exitbypass=1 |
|||
command_start.sh |
|||
sleep 10 |
|||
command_stop.sh |
@ -1,86 +0,0 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM monitor_gsquery.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://linuxgsm.com |
|||
# Description: Uses gsquery.py to query the server port. |
|||
# Detects if the server has frozen with the process still running. |
|||
|
|||
local commandname="MONITOR" |
|||
local commandaction="Monitor" |
|||
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
|
|||
# Downloads gsquery.py if missing |
|||
if [ ! -f "${functionsdir}/gsquery.py" ]; then |
|||
fn_fetch_file_github "lgsm/functions" "gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" |
|||
fi |
|||
|
|||
info_config.sh |
|||
|
|||
if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|||
port=$((port + 1)) |
|||
elif [ "${engine}" == "realvirtuality" ]; then |
|||
port=$((port + 1)) |
|||
elif [ "${engine}" == "spark" ]; then |
|||
port=$((port + 1)) |
|||
elif [ "${engine}" == "idtech3_ql" ]; then |
|||
engine="quakelive" |
|||
fi |
|||
|
|||
if [ -n "${queryport}" ]; then |
|||
port="${queryport}" |
|||
fi |
|||
|
|||
fn_print_info "Querying port: gsquery.py enabled" |
|||
fn_script_log_info "Querying port: gsquery.py enabled" |
|||
sleep 1 |
|||
|
|||
# Will query up to 4 times every 15 seconds. |
|||
# Servers changing map can return a failure. |
|||
# Will Wait up to 60 seconds to confirm server is down giving server time to change map. |
|||
totalseconds=0 |
|||
for queryattempt in {1..5}; do |
|||
fn_print_dots "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " |
|||
fn_print_querying_eol |
|||
fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING" |
|||
|
|||
gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1) |
|||
exitcode=$? |
|||
|
|||
sleep 1 |
|||
if [ "${exitcode}" == "0" ]; then |
|||
# Server OK |
|||
fn_print_ok "Querying port: ${ip}:${port} : ${queryattempt} : " |
|||
fn_print_ok_eol_nl |
|||
fn_script_log_pass "Querying port: ${ip}:${port} : ${queryattempt} : OK" |
|||
exitcode=0 |
|||
break |
|||
else |
|||
# Server failed query |
|||
fn_script_log_info "Querying port: ${ip}:${port} : ${queryattempt} : ${gsquerycmd}" |
|||
|
|||
if [ "${queryattempt}" == "5" ]; then |
|||
# Server failed query 4 times confirmed failure |
|||
fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : " |
|||
fn_print_fail_eol_nl |
|||
fn_script_log_error "Querying port: ${ip}:${port} : ${queryattempt} : FAIL" |
|||
sleep 1 |
|||
|
|||
# Send alert if enabled |
|||
alert="restartquery" |
|||
alert.sh |
|||
command_restart.sh |
|||
break |
|||
fi |
|||
|
|||
# Seconds counter |
|||
for seconds in {1..15}; do |
|||
fn_print_fail "Querying port: ${ip}:${port} : ${totalseconds}/${queryattempt} : ${red}${gsquerycmd}${default}" |
|||
totalseconds=$((totalseconds + 1)) |
|||
sleep 1 |
|||
if [ "${seconds}" == "15" ]; then |
|||
break |
|||
fi |
|||
done |
|||
fi |
|||
done |
|||
core_exit.sh |
@ -0,0 +1,96 @@ |
|||
#!/bin/bash |
|||
# query_gamedig.sh function |
|||
# Author: Daniel Gibbs |
|||
# Website: https://gameservermanagers.com |
|||
# Description: Querys a gameserver using node-gamedig. |
|||
# https://github.com/sonicsnes/node-gamedig |
|||
|
|||
#Check if gamedig and jq are installed |
|||
if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then |
|||
|
|||
if [ "${engine}" == "idtech3_ql" ]; then |
|||
local engine="quakelive" |
|||
elif [ "${gamename}" == "Killing Floor 2" ]; then |
|||
local engine="unreal4" |
|||
fi |
|||
|
|||
local engine_query_array=( avalanche3.0 madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 ) |
|||
for engine_query in "${engine_query_array[@]}" |
|||
do |
|||
if [ "${engine_query}" == "${engine}" ]; then |
|||
gamedigengine="protocol-valve" |
|||
fi |
|||
done |
|||
|
|||
local engine_query_array=( avalanche2.0 ) |
|||
for engine_query in "${engine_query_array[@]}" |
|||
do |
|||
if [ "${engine_query}" == "${engine}" ]; then |
|||
gamedigengine="jc2mp" |
|||
fi |
|||
done |
|||
|
|||
local engine_query_array=( idtech2 iw2.0 ) |
|||
for engine_query in "${engine_query_array[@]}" |
|||
do |
|||
if [ "${engine_query}" == "${engine}" ]; then |
|||
gamedigengine="protocol-quake2" |
|||
fi |
|||
done |
|||
|
|||
local engine_query_array=( idtech3 quake iw3.0 ) |
|||
for engine_query in "${engine_query_array[@]}" |
|||
do |
|||
if [ "${engine_query}" == "${engine}" ]; then |
|||
gamedigengine="protocol-quake3" |
|||
fi |
|||
done |
|||
|
|||
local shortname_query_array=( ts3 ) |
|||
for shortname_query in "${shortname_query_array[@]}" |
|||
do |
|||
if [ "${shortname_query}" == "${shortname}" ]; then |
|||
gamedigengine="teamspeak3" |
|||
fi |
|||
done |
|||
|
|||
|
|||
# will bypass query if server offline |
|||
check_status.sh |
|||
if [ "${status}" != "0" ]; then |
|||
# checks if query is working 0 = pass |
|||
querystatus=$(gamedig --type "${gamedigengine}" --host "${ip}" --port "${queryport}" | jq '.error|length') |
|||
# raw output |
|||
gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --port "${queryport}") |
|||
|
|||
# server name |
|||
gdname=$(echo "${gamedigraw}" | jq -re '.name') |
|||
if [ "${gdname}" == "null" ]; then |
|||
gdname= |
|||
fi |
|||
|
|||
# numplayers |
|||
gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') |
|||
if [ "${gdplayers}" == "null" ]; then |
|||
gdplayers= |
|||
fi |
|||
|
|||
# maxplayers |
|||
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') |
|||
if [ "${gdmaxplayers}" == "null" ]; then |
|||
maxplayers= |
|||
fi |
|||
|
|||
# current map |
|||
gdmap=$(echo "${gamedigraw}" | jq -re '.map') |
|||
if [ "${gdmap}" == "null" ]; then |
|||
gdmap= |
|||
fi |
|||
|
|||
# numbots |
|||
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') |
|||
if [ "${gdbots}" == "null" ]; then |
|||
gdbots= |
|||
fi |
|||
fi |
|||
fi |