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:" echo -e "Game: Master:"
fi fi
if [ -v steamauthenticationport ]; then if [ -v steamauthport ]; 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 }')" 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 else
echo -e "Steam: Auth:" echo -e "Steam: Auth:"
fi fi

6
lgsm/functions/info_config.sh

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

31
lgsm/functions/info_messages.sh

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

Loading…
Cancel
Save