@@ -12,15 +12,15 @@ info_game.sh
1212
1313ip_commands_array=(" /bin/ip" " /usr/sbin/ip" " ip" )
1414for ip_command in " ${ip_commands_array[@]} " ; do
15- if [ " $( command -v ${ip_command} 2> /dev/null) " ]; then
15+ if [ " $( command -v " ${ip_command} " 2> /dev/null) " ]; then
1616 ipcommand=" ${ip_command} "
1717 break
1818 fi
1919done
2020
2121ethtool_commands_array=(" /bin/ethtool" " /usr/sbin/ethtool" " ethtool" )
2222for ethtool_command in " ${ethtool_commands_array[@]} " ; do
23- if [ " $( command -v ${ethtool_command} 2> /dev/null) " ]; then
23+ if [ " $( command -v " ${ethtool_command} " 2> /dev/null) " ]; then
2424 ethtoolcommand=" ${ethtool_command} "
2525 break
2626 fi
@@ -38,25 +38,25 @@ function fn_is_valid_ip() {
3838
3939# If the IP variable has been set by user.
4040if fn_is_valid_ip " ${ip} " ; then
41- queryips=( " ${ip} " )
42- webadminip=( " ${ip} " )
43- telnetip=( " ${ip} " )
41+ queryips=(" ${ip} " )
42+ webadminip=(" ${ip} " )
43+ telnetip=(" ${ip} " )
4444# If game config does have an IP set.
45- elif fn_is_valid_ip " ${configip} " ; then
46- queryips=( " ${configip} " )
45+ elif fn_is_valid_ip " ${configip} " ; then
46+ queryips=(" ${configip} " )
4747 ip=" ${configip} "
4848 webadminip=(" ${configip} " )
4949 telnetip=(" ${configip} " )
5050# If there is only 1 server IP address.
5151# Some IP details can automaticly use the one IP
5252elif [ " ${# current_ips[@]} " == " 1" ]; then
53- queryips=( " 127.0.0.1" " ${current_ips[@]} " )
53+ queryips=(" 127.0.0.1" " ${current_ips[@]} " )
5454 ip=" 0.0.0.0"
5555 webadminip=(" ${current_ips[@]} " )
5656 telnetip=(" ${current_ips[@]} " )
5757# If no ip is set by the user and server has more than one IP.
5858else
59- queryips=( " 127.0.0.1" " ${current_ips[@]} " )
59+ queryips=(" 127.0.0.1" " ${current_ips[@]} " )
6060 ip=" 0.0.0.0"
6161 webadminip=(" ${ip} " )
6262 telnetip=(" ${ip} " )
0 commit comments