From b9b641c300d45aa1524e4793102e786e0cf82a13 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 2 Apr 2023 16:38:12 +0100 Subject: [PATCH] prettier --- lgsm/functions/check_ip.sh | 18 +++++++++--------- lgsm/functions/command_monitor.sh | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index bf301008f..4b8eca5ec 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -12,7 +12,7 @@ info_game.sh ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip") for ip_command in "${ip_commands_array[@]}"; do - if [ "$(command -v ${ip_command} 2> /dev/null)" ]; then + if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then ipcommand="${ip_command}" break fi @@ -20,7 +20,7 @@ done ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool") for ethtool_command in "${ethtool_commands_array[@]}"; do - if [ "$(command -v ${ethtool_command} 2> /dev/null)" ]; then + if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then ethtoolcommand="${ethtool_command}" break fi @@ -38,25 +38,25 @@ function fn_is_valid_ip() { # If the IP variable has been set by user. if fn_is_valid_ip "${ip}"; then - queryips=( "${ip}" ) - webadminip=( "${ip}" ) - telnetip=( "${ip}" ) + queryips=("${ip}") + webadminip=("${ip}") + telnetip=("${ip}") # If game config does have an IP set. -elif fn_is_valid_ip "${configip}";then - queryips=( "${configip}" ) +elif fn_is_valid_ip "${configip}"; then + queryips=("${configip}") ip="${configip}" webadminip=("${configip}") telnetip=("${configip}") # If there is only 1 server IP address. # Some IP details can automaticly use the one IP elif [ "${#current_ips[@]}" == "1" ]; then - queryips=( "127.0.0.1" "${current_ips[@]}" ) + queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" webadminip=("${current_ips[@]}") telnetip=("${current_ips[@]}") # If no ip is set by the user and server has more than one IP. else - queryips=( "127.0.0.1" "${current_ips[@]}" ) + queryips=("127.0.0.1" "${current_ips[@]}") ip="0.0.0.0" webadminip=("${ip}") telnetip=("${ip}") diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 0d6402942..20c830e0b 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -72,7 +72,7 @@ fn_monitor_check_queryport() { fn_print_dots "Checking port: " fn_print_checking_eol fn_script_log_info "Checking port: CHECKING" - if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ ${shortname} == "av" ]; then + if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then fn_print_warn "Checking port: Unable to query, rcon is not enabled" fn_script_log_warn "Checking port: Unable to query, rcon is not enabled" else