|
|
@ -23,7 +23,7 @@ if [ "${engine}" == "avalanche" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "Name" "${servercfgfullpath}"|sed 's/Name//g'|tr -d '=", \n') |
|
|
|
servername=$(grep "Name" "${servercfgfullpath}"|sed 's/Name//g'|tr -d '=", \n') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -42,7 +42,7 @@ if [ "${engine}" == "avalanche" ]; then |
|
|
|
|
|
|
|
# server password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
serverpassword=$(grep -s "Password" "${servercfgfullpath}"|sed 's/Password//g'|tr -d '=", \n') |
|
|
|
serverpassword=$(grep "Password" "${servercfgfullpath}"|sed 's/Password//g'|tr -d '=", \n') |
|
|
|
if [ ! -n "${serverpassword}" ]; then |
|
|
|
serverpassword="NOT SET" |
|
|
|
fi |
|
|
@ -52,7 +52,7 @@ if [ "${engine}" == "avalanche" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "MaxPlayers" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "MaxPlayers" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -62,7 +62,7 @@ if [ "${engine}" == "avalanche" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep "BindPort" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
port=$(grep "BindPort" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -75,7 +75,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "default_server_name = " "${servercfgfullpath}"|sed 's/default_server_name = //g') |
|
|
|
servername=$(grep "default_server_name = " "${servercfgfullpath}"|sed 's/default_server_name = //g') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -85,7 +85,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# server password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
serverpassword=$(grep -s "server_password = " "${servercfgfullpath}"|grep -v "#"|sed 's/server_password = //g') |
|
|
|
serverpassword=$(grep "server_password = " "${servercfgfullpath}"|grep -v "#"|sed 's/server_password = //g') |
|
|
|
if [ ! -n "${serverpassword}" ]; then |
|
|
|
serverpassword="NOT SET" |
|
|
|
fi |
|
|
@ -95,7 +95,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "max_players" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "max_players" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -105,7 +105,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# game mode |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
gamemode=$(grep -s "game_mode = " "${servercfgfullpath}"|grep -v "#"|sed 's/game_mode = //g') |
|
|
|
gamemode=$(grep "game_mode = " "${servercfgfullpath}"|grep -v "#"|sed 's/game_mode = //g') |
|
|
|
if [ ! -n "${gamemode}" ]; then |
|
|
|
gamemode="NOT SET" |
|
|
|
fi |
|
|
@ -115,7 +115,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# tickrate |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
tickrate=$(grep -s "tick_rate" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
tickrate=$(grep "tick_rate" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${tickrate}" ]; then |
|
|
|
tickrate="NOT SET" |
|
|
|
fi |
|
|
@ -125,7 +125,7 @@ elif [ "${engine}" == "dontstarve" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep -s "server_port" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
port=$(grep "server_port" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -138,7 +138,7 @@ elif [ "${engine}" == "projectzomboid" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "PublicName=" "${servercfgfullpath}"|sed 's/PublicName=//g'|tr -d '=", \n') |
|
|
|
servername=$(grep "PublicName=" "${servercfgfullpath}"|sed 's/PublicName=//g'|tr -d '=", \n') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -148,7 +148,7 @@ elif [ "${engine}" == "projectzomboid" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "MaxPlayers=" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "MaxPlayers=" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -158,7 +158,7 @@ elif [ "${engine}" == "projectzomboid" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep -s "DefaultPort=" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
port=$(grep "DefaultPort=" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -170,7 +170,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "hostname" "${servercfgfullpath}"| grep -v //|sed -e 's/\<hostname\>//g'| tr -d '=\"; ') |
|
|
|
servername=$(grep "hostname" "${servercfgfullpath}"|grep -v "//"|sed -e 's/\<hostname\>//g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -180,7 +180,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# admin password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
adminpassword=$(grep -s "password =" "${servercfgfullpath}"|grep -v //|sed -e 's/\password//g'|tr -d '=\"; ') |
|
|
|
adminpassword=$(grep "password =" "${servercfgfullpath}"|grep -v "//"|sed -e 's/\password//g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${adminpassword}" ]; then |
|
|
|
adminpassword="NOT SET" |
|
|
|
fi |
|
|
@ -190,7 +190,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# server password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
serverpassword=$(grep -s "passwordAdmin" "${servercfgfullpath}"|grep -v //|sed -e 's/\passwordAdmin//g'|tr -d '=\"; ') |
|
|
|
serverpassword=$(grep "passwordAdmin" "${servercfgfullpath}"|grep -v "//"|sed -e 's/\passwordAdmin//g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${adminpassword}" ]; then |
|
|
|
serverpassword="NOT SET" |
|
|
|
fi |
|
|
@ -200,7 +200,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "maxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "maxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -210,7 +210,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep -s "serverport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
port=$(grep "serverport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -218,7 +218,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
queryport=$(grep -s "steamqueryport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
queryport=$(grep "steamqueryport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${queryport}" ]; then |
|
|
|
queryport="0" |
|
|
@ -226,7 +226,7 @@ elif [ "${engine}" == "realvirtuality" ]; then |
|
|
|
|
|
|
|
# master port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
masterport=$(grep -s "steamport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
masterport=$(grep "steamport=" "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${masterport}" ]; then |
|
|
|
masterport="0" |
|
|
@ -238,7 +238,7 @@ elif [ "${engine}" == "seriousengine35" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "prj_strMultiplayerSessionName" "${servercfgfullpath}"|sed 's/prj_strMultiplayerSessionName = //g'|tr -d '=\"; ') |
|
|
|
servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}"|sed 's/prj_strMultiplayerSessionName = //g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -248,7 +248,7 @@ elif [ "${engine}" == "seriousengine35" ]; then |
|
|
|
|
|
|
|
# rcon password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
rcon=$(grep -s "rcts_strAdminPassword" "${servercfgfullpath}"|sed 's/rcts_strAdminPassword = //g'|tr -d '=\"; ') |
|
|
|
rcon=$(grep "rcts_strAdminPassword" "${servercfgfullpath}"|sed 's/rcts_strAdminPassword = //g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${rcon}" ]; then |
|
|
|
rcon="NOT SET" |
|
|
|
fi |
|
|
@ -258,7 +258,7 @@ elif [ "${engine}" == "seriousengine35" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "gam_ctMaxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -268,7 +268,7 @@ elif [ "${engine}" == "seriousengine35" ]; then |
|
|
|
|
|
|
|
# game mode |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
gamemode=$(grep -s "gam_idGameMode" "${servercfgfullpath}"|grep -v "#"|sed 's/gam_idGameMode//g'|tr -d '=\"; ') |
|
|
|
gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}"|grep -v "#"|sed 's/gam_idGameMode//g'|tr -d '=\"; ') |
|
|
|
if [ ! -n "${gamemode}" ]; then |
|
|
|
gamemode="NOT SET" |
|
|
|
fi |
|
|
@ -278,7 +278,7 @@ elif [ "${engine}" == "seriousengine35" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep -s "prj_uwPort" "${servercfgfullpath}"|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
port=$(grep "prj_uwPort" "${servercfgfullpath}"|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -298,7 +298,7 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s "hostname" "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') |
|
|
|
servername=$(grep "hostname" "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -308,7 +308,7 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then |
|
|
|
|
|
|
|
# server password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
serverpassword=$(grep -s "sv_password" "${servercfgfullpath}"|sed 's/sv_password//g'|sed 's/"//g') |
|
|
|
serverpassword=$(grep "sv_password" "${servercfgfullpath}"|sed 's/sv_password//g'|sed 's/"//g') |
|
|
|
if [ ! -n "${serverpassword}" ]; then |
|
|
|
serverpassword="NOT SET" |
|
|
|
fi |
|
|
@ -318,7 +318,7 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then |
|
|
|
|
|
|
|
# rcon password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
rcon=$(grep -s "rcon_password" "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g') |
|
|
|
rcon=$(grep "rcon_password" "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g') |
|
|
|
if [ ! -n "${rcon}" ]; then |
|
|
|
rcon="NOT SET" |
|
|
|
fi |
|
|
@ -328,7 +328,7 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep -s "gam_ctMaxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}"|grep -v "#"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -340,7 +340,7 @@ elif [ "${engine}" == "spark" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
queryport=$((${port} + 1)) |
|
|
|
queryport=$((port + 1)) |
|
|
|
fi |
|
|
|
if [ ! -n "${queryport}" ]; then |
|
|
|
queryport="0" |
|
|
@ -369,7 +369,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep "default_voice_port=" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
port=$(grep "default_voice_port=" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="9987" |
|
|
@ -377,7 +377,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
queryport=$(grep "query_port=" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
queryport=$(grep "query_port=" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${queryport}" ]; then |
|
|
|
queryport="10011" |
|
|
@ -385,7 +385,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then |
|
|
|
|
|
|
|
# fileport port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
fileport=$(grep "filetransfer_port=" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
fileport=$(grep "filetransfer_port=" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${fileport}" ]; then |
|
|
|
fileport="30033" |
|
|
@ -425,7 +425,7 @@ elif [ "${engine}" == "unity3d" ]; then |
|
|
|
|
|
|
|
# webadmin port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
webadminport=$(grep "ControlPanelPort" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${webadminport}" ]; then |
|
|
|
webadminport="0" |
|
|
@ -463,7 +463,7 @@ elif [ "${engine}" == "unity3d" ]; then |
|
|
|
|
|
|
|
# telnet port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
telnetport=$(grep "TelnetPort" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
telnetport=$(grep "TelnetPort" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${telnetport}" ]; then |
|
|
|
telnetport="0" |
|
|
@ -481,7 +481,7 @@ elif [ "${engine}" == "unity3d" ]; then |
|
|
|
|
|
|
|
# slots |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
slots=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
slots=$(grep "ServerMaxPlayerCount" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
if [ ! -n "${slots}" ]; then |
|
|
|
slots="NOT SET" |
|
|
|
fi |
|
|
@ -511,7 +511,7 @@ elif [ "${engine}" == "unity3d" ]; then |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep "ServerPort" "${servercfgfullpath}"|tr -cd [:digit:]) |
|
|
|
port=$(grep "ServerPort" "${servercfgfullpath}"|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -519,7 +519,7 @@ elif [ "${engine}" == "unity3d" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
queryport=$((${port} + 1)) |
|
|
|
queryport=$((port + 1)) |
|
|
|
fi |
|
|
|
if [ ! -n "${queryport}" ]; then |
|
|
|
queryport="0" |
|
|
@ -529,7 +529,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# server name |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
servername=$(grep -s ServerName= ${servercfgfullpath}|sed 's/ServerName=//g') |
|
|
|
servername=$(grep "ServerName=" ${servercfgfullpath}|sed 's/ServerName=//g') |
|
|
|
if [ ! -n "${servername}" ]; then |
|
|
|
servername="NOT SET" |
|
|
|
fi |
|
|
@ -537,9 +537,29 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
servername="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
# server password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
serverpassword=$(grep "GamePassword=" ${servercfgfullpath}|sed 's/GamePassword=//g') |
|
|
|
if [ ! -n "${serverpassword}" ]; then |
|
|
|
serverpassword="NOT SET" |
|
|
|
fi |
|
|
|
else |
|
|
|
serverpassword="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
# admin password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
adminpassword=$(grep "AdminPassword=" ${servercfgfullpath}|sed 's/AdminPassword=//g') |
|
|
|
if [ ! -n "${adminpassword}" ]; then |
|
|
|
adminpassword="NOT SET" |
|
|
|
fi |
|
|
|
else |
|
|
|
adminpassword="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
# port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
port=$(grep Port= "${servercfgfullpath}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
port=$(grep "Port=" "${servercfgfullpath}"|grep -v "Master"|grep -v "LAN"|grep -v "Proxy"|grep -v "Listen"|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${port}" ]; then |
|
|
|
port="0" |
|
|
@ -547,7 +567,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
queryport=$((${port} + 1)) |
|
|
|
queryport=$((port + 1)) |
|
|
|
fi |
|
|
|
if [ ! -n "${queryport}" ]; then |
|
|
|
queryport="0" |
|
|
@ -555,7 +575,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# gamespy query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
gsqueryport=$(grep OldQueryPortNumber= "${servercfgfullpath}"|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
gsqueryport=$(grep "OldQueryPortNumber=" "${servercfgfullpath}"|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${gsqueryport}" ]; then |
|
|
|
gsqueryport="0" |
|
|
@ -563,7 +583,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# query port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
udplinkport=$((${port} + 2)) |
|
|
|
udplinkport=$((port + 2)) |
|
|
|
fi |
|
|
|
if [ ! -n "${udplinkport}" ]; then |
|
|
|
udplinkport="0" |
|
|
@ -571,7 +591,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# webadmin enabled |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminenabled=$(grep bEnabled= "${servercfgfullpath}"|sed 's/bEnabled=//g'|tr -d '\r') |
|
|
|
webadminenabled=$(grep "bEnabled=" "${servercfgfullpath}"|sed 's/bEnabled=//g'|tr -d '\r') |
|
|
|
if [ ! -n "${webadminenabled}" ]; then |
|
|
|
webadminenabled="NOT SET" |
|
|
|
fi |
|
|
@ -581,7 +601,7 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# webadmin port |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminport=$(grep ListenPort= "${servercfgfullpath}"|tr -d '\r'|tr -cd [:digit:]) |
|
|
|
webadminport=$(grep "ListenPort=" "${servercfgfullpath}"|tr -d '\r'|tr -cd "[:digit:]") |
|
|
|
fi |
|
|
|
if [ ! -n "${webadminport}" ]; then |
|
|
|
webadminport="0" |
|
|
@ -591,17 +611,17 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# webadmin user |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminuser=$(grep AdminUsername= "${servercfgfullpath}"|sed 's/\AdminUsername=//g') |
|
|
|
if [ ! -n "${webadminpass}" ]; then |
|
|
|
webadminpass="NOT SET" |
|
|
|
webadminuser=$(grep "AdminUsername=" "${servercfgfullpath}"|sed 's/\AdminUsername=//g') |
|
|
|
if [ ! -n "${webadminuser}" ]; then |
|
|
|
webadminuser="NOT SET" |
|
|
|
fi |
|
|
|
else |
|
|
|
webadminpass="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
webadminuser="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
# webadmin password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminpass=$(grep UTServerAdmin.UTServerAdmin "${servercfgfullpath}" -A 2| grep AdminPassword=|sed 's/\AdminPassword=//g') |
|
|
|
webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 2|grep "AdminPassword="|sed 's/\AdminPassword=//g') |
|
|
|
if [ ! -n "${webadminpass}" ]; then |
|
|
|
webadminpass="NOT SET" |
|
|
|
fi |
|
|
@ -613,17 +633,17 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then |
|
|
|
|
|
|
|
# webadmin user |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminuser=$(grep AdminName= "${servercfgfullpath}"|sed 's/\AdminName=//g') |
|
|
|
if [ ! -n "${webadminpass}" ]; then |
|
|
|
webadminpass="NOT SET" |
|
|
|
webadminuser=$(grep "AdminName=" "${servercfgfullpath}"|sed 's/\AdminName=//g') |
|
|
|
if [ ! -n "${webadminuser}" ]; then |
|
|
|
webadminuser="NOT SET" |
|
|
|
fi |
|
|
|
else |
|
|
|
webadminpass="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
webadminuser="\e[0;31mUNAVAILABLE\e[0m" |
|
|
|
fi |
|
|
|
|
|
|
|
# webadmin password |
|
|
|
if [ -f "${servercfgfullpath}" ]; then |
|
|
|
webadminpass=$(grep AdminPassword= "${servercfgfullpath}"|sed 's/\AdminPassword=//g') |
|
|
|
webadminpass=$(grep "AdminPassword=" "${servercfgfullpath}"|sed 's/\AdminPassword=//g') |
|
|
|
if [ ! -n "${webadminpass}" ]; then |
|
|
|
webadminpass="NOT SET" |
|
|
|
fi |
|
|
|