Browse Source

refactor: remove unnecessary code for game+1, game+2, and game+3

The code changes in this commit involve removing unnecessary code related to the variables port2, port3, and port4. These variables were used to display information about additional games (game+1, game+2, and game+3) in the output. However, since these variables are not being used elsewhere in the script, they have been removed along with the corresponding echo statements. This refactor simplifies the code by eliminating redundant logic.
pull/4261/head
Daniel Gibbs 2 years ago
parent
commit
fcbdf3171b
  1. 19
      lgsm/modules/command_dev_query_raw.sh

19
lgsm/modules/command_dev_query_raw.sh

@ -32,25 +32,6 @@ echo -e "=================================================================="
else
echo -e "Game:"
fi
if [ "${shortname}" == "rw" ]; then
if [ -v port2 ]; then
echo -e "Game+1: \t${port2} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port2}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port2}" | grep udp | awk '{ print $2 }')"
else
echo -e "Game+1:"
fi
if [ -v port3 ]; then
echo -e "Game+2: \t${port3} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port3}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port3}" | grep udp | awk '{ print $2 }')"
else
echo -e "Game+2:"
fi
if [ -v port4 ]; then
echo -e "Game+3: \t${port4} \t$(ss -tupl | grep -c "${port}") \t$(ss -tupl | grep "${port4}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port4}" | grep udp | awk '{ print $2 }')"
else
echo -e "Game+3:"
fi
fi
if [ "${shortname}" == "pvr" ]; then
if [ -v port401 ]; then
echo -e "Game+400: \t${port401} \t$(ss -tupl | grep -c "${port401}") \t$(ss -tupl | grep "${port401}" | grep tcp | awk '{ print $2 }') \t$(ss -tupl | grep "${port401}" | grep udp | awk '{ print $2 }')"

Loading…
Cancel
Save