Browse Source

changes

pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
8a1e524a3e
  1. 4
      lgsm/functions/command_dev_query_raw.sh
  2. 6
      lgsm/functions/info_config.sh
  3. 31
      lgsm/functions/info_messages.sh

4
lgsm/functions/command_dev_query_raw.sh

@ -95,8 +95,8 @@ else
echo -e "Game: Master:"
fi
if [ -v steamauthenticationport ]; then
echo -e "Steam: Auth: \t${steamauthenticationport} \t$(ss -tupl|grep ${steamauthenticationport}|wc -l) \t$(ss -tupl|grep ${steamauthenticationport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamauthenticationport}|grep udp|awk '{ print $2 }')"
if [ -v steamauthport ]; then
echo -e "Steam: Auth: \t${steamauthport} \t$(ss -tupl|grep ${steamauthport}|wc -l) \t$(ss -tupl|grep ${steamauthport}|grep tcp|awk '{ print $2 }') \t$(ss -tupl|grep ${steamauthport}|grep udp|awk '{ print $2 }')"
else
echo -e "Steam: Auth:"
fi

6
lgsm/functions/info_config.sh

@ -337,16 +337,16 @@ fn_info_config_dontstarve(){
if [ ! -f "${servercfgfullpath}" ]; then
port="${zero}"
steamauthenticationport="${zero}"
steamauthport="${zero}"
steammasterport="${zero}"
else
port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]')
steamauthenticationport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
steamauthport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
steammasterport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
# Not Set
port=${port:-"0"}
steamauthenticationport=${steamauthenticationport:-"0"}
steamauthport=${steamauthport:-"0"}
steammasterport=${steammasterport:-"0"}
fi
}

31
lgsm/functions/info_messages.sh

@ -779,15 +779,17 @@ fn_info_message_bt1944(){
} | column -s $'\t' -t
}
fn_info_message_cod(){
fn_info_message_chivalry(){
fn_info_message_password_strip
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
echo -e "RCON\t${rconport}\ttcp\t$(echo "${ssinfo}" | grep ${rconport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_coduo(){
fn_info_message_cod(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
@ -795,52 +797,53 @@ fn_info_message_coduo(){
} | column -s $'\t' -t
}
fn_info_message_chivalry(){
fn_info_message_password_strip
fn_info_message_coduo(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
echo -e "RCON\t${rconport}\ttcp\t$(echo "${ssinfo}" | grep ${rconport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_cod2(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_cod4(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_codwaw(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_dst(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game: Server\t${port}\tudp"
echo -e "> Game: Master\t${masterport}\tudp"
echo -e "> Steam: Auth\t${steamauthenticationport}\tudp"
echo -e "> Steam: Master\t${steammasterport}\tudp"
echo -e "Game: Server\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Game: Master\t${masterport}\tudp\t$(echo "${ssinfo}" | grep ${masterport} | wc -l)"
echo -e "Steam: Auth\t${steamauthport}\tudpt$(echo "${ssinfo}" | grep ${steamauthport} | wc -l)"
echo -e "Steam: Master\t${steammasterport}\tudpt$(echo "${ssinfo}" | grep ${steammasterport} | wc -l)"
} | column -s $'\t' -t
}
fn_info_message_eco(){
{
echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}"
echo -e "> Game\t${port}\tudp"
echo -e "> Web Admin\t${webadminport}\ttcp"
echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)"
echo -e "Web Admin\t${webadminport}\ttcp\t$(echo "${ssinfo}" | grep ${webadminport} | wc -l)"
} | column -s $'\t' -t
}

Loading…
Cancel
Save