<commit_before>#!/bin/bash
# LGSM check_ip.sh function
# Author: <NAME>
# Website: https://gameservermanagers.com
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0".

local commandname="CHECK"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

if [ "${gamename}" != "TeamSpeak 3" ]; then
	if [ ! -f "/bin/ip" ]; then
		ipcommand="/sbin/ip"
	else
		ipcommand="ip"
	fi
	getip=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
	getipwc=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0)

	if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
		if [ "${getipwc}" -ge "2" ]; then
			fn_print_dots "Check IP"
			sleep 1
			fn_print_fail "Check IP: Multiple active network interfaces found."
			sleep 1
			echo -en "\n"
			fn_print_infomation "Specify the IP you want to use within the ${selfname} script.\n"
			echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
			echo -en "${getip}\n"
			echo -en ""
			echo -en "https://gameservermanagers.com/network-interfaces\n"
			echo -en ""
			fn_script_log_fatal "Multiple active network interfaces found."
			fn_script_log_fatal "Manually specify the IP you want to use within the ${selfname} script."
			fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n"
			core_exit.sh
		else
			ip=${getip}
		fi
	fi
fi
<commit_msg>mumble's IP address is hard set with the 'host=' setting in the ini file.  check_ip's result returns an error due to looking for the ip setting in the server script.<commit_after>#!/bin/bash
# LGSM check_ip.sh function
# Author: <NAME>
# Website: https://gameservermanagers.com
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0".

local commandname="CHECK"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then
	if [ ! -f "/bin/ip" ]; then
		ipcommand="/sbin/ip"
	else
		ipcommand="ip"
	fi
	getip=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
	getipwc=$(${ipcommand} -o -4 addr|awk '{print $4}'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0)

	if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
		if [ "${getipwc}" -ge "2" ]; then
			fn_print_dots "Check IP"
			sleep 1
			fn_print_fail "Check IP: Multiple active network interfaces found."
			sleep 1
			echo -en "\n"
			fn_print_infomation "Specify the IP you want to use within the ${selfname} script.\n"
			echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
			echo -en "${getip}\n"
			echo -en ""
			echo -en "https://gameservermanagers.com/network-interfaces\n"
			echo -en ""
			fn_script_log_fatal "Multiple active network interfaces found."
			fn_script_log_fatal "Manually specify the IP you want to use within the ${selfname} script."
			fn_script_log_fatal "https://gameservermanagers.com/network-interfaces\n"
			core_exit.sh
		else
			ip=${getip}
		fi
	fi
fi

{'fraction_non_alphanumeric': 0.18119337706966573, 'fraction_numerical': 0.025616994689159636, 'mean_word_length': 3.593974175035868, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5899663', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1175, 'n_words': 341}