@@ -12,15 +12,15 @@ info_game.sh
12
12
13
13
ip_commands_array=(" /bin/ip" " /usr/sbin/ip" " ip" )
14
14
for 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
16
16
ipcommand=" ${ip_command} "
17
17
break
18
18
fi
19
19
done
20
20
21
21
ethtool_commands_array=(" /bin/ethtool" " /usr/sbin/ethtool" " ethtool" )
22
22
for 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
24
24
ethtoolcommand=" ${ethtool_command} "
25
25
break
26
26
fi
@@ -38,25 +38,25 @@ function fn_is_valid_ip() {
38
38
39
39
# If the IP variable has been set by user.
40
40
if fn_is_valid_ip " ${ip} " ; then
41
- queryips=( " ${ip} " )
42
- webadminip=( " ${ip} " )
43
- telnetip=( " ${ip} " )
41
+ queryips=(" ${ip} " )
42
+ webadminip=(" ${ip} " )
43
+ telnetip=(" ${ip} " )
44
44
# 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} " )
47
47
ip=" ${configip} "
48
48
webadminip=(" ${configip} " )
49
49
telnetip=(" ${configip} " )
50
50
# If there is only 1 server IP address.
51
51
# Some IP details can automaticly use the one IP
52
52
elif [ " ${# current_ips[@]} " == " 1" ]; then
53
- queryips=( " 127.0.0.1" " ${current_ips[@]} " )
53
+ queryips=(" 127.0.0.1" " ${current_ips[@]} " )
54
54
ip=" 0.0.0.0"
55
55
webadminip=(" ${current_ips[@]} " )
56
56
telnetip=(" ${current_ips[@]} " )
57
57
# If no ip is set by the user and server has more than one IP.
58
58
else
59
- queryips=( " 127.0.0.1" " ${current_ips[@]} " )
59
+ queryips=(" 127.0.0.1" " ${current_ips[@]} " )
60
60
ip=" 0.0.0.0"
61
61
webadminip=(" ${ip} " )
62
62
telnetip=(" ${ip} " )
0 commit comments