Przeglądaj źródła

Merge remote-tracking branch 'refs/remotes/origin/master' into mcserver

Daniel Gibbs 9 lat temu
rodzic
commit
d569d06495

+ 8 - 6
FistfulOfFrags/cfg/lgsm-default.cfg

@@ -1,7 +1,7 @@
 // ****************************************************************************
 //                                                                            *
 //     Fistful of Frags - server.cfg                                          *
-//     Version 100116                                                         *
+//     Version 240716                                                         *
 //                                                                            *
 // ****************************************************************************
 
@@ -25,12 +25,13 @@ sv_lan 0
 
 // ............................... Map Cycles ............................... //
 // info: There are several predefined mapcycles available that are listed below.
-// You can also create your own custom mapcycle. 
+// You can also create your own custom mapcycle.
 
 // "mapcycle.txt" - All Shootout/2 Team Shootout/4 Team Shootout maps
 // "mapcycle_12.txt" - All 12 slot maps for Shootout/2 Team Shootout/4 Team Shootout
 // "mapcycle_32.txt" - All 32 slot maps for Shootout/2 Team Shootout/4 Team Shootout
 // "mapcycle_tp.txt" - All Teamplay maps
+// "mapcycle_vs.txt" - All versus mode maps
 // "mapcycle_gt.txt" - All Ghost Town maps
 mapcyclefile "mapcycle.txt"
 
@@ -48,11 +49,12 @@ mp_timelimit 15
 // 2 = Teamplay
 // 3 = Break Bad
 // 4 = Elimination
-fof_sv_currentmode 1 
+// 5 = Versus
+fof_sv_currentmode 1
 
 // Teamplay
 // 0 = Free-for-all
-// 1 = Team Deathmatch
+// 1 = Team Deathmatch or Teamplay mode
 mp_teamplay 0
 
 // Team numbers
@@ -96,7 +98,7 @@ sv_downloadurl ""
 // personal banlist based on user IDs.
 exec banned_user.cfg
 
-// personal banlist based on user IPs.	
+// personal banlist based on user IPs.
 exec banned_ip.cfg
 
 writeid
@@ -121,4 +123,4 @@ sv_logfile 1
 
 // Log server information to only one file.
 // Default: sv_log_onefile 0
-sv_log_onefile 0
+sv_log_onefile 0

+ 1 - 1
README.md

@@ -37,7 +37,7 @@ All FAQ can be found here.
 
 <a href="https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ">https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ</a>
 <h2>Donate</h2>
-If you want to donate to the project you can via PayPal, Flattr or Gratipay. I have had a may kind people show their support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
+If you want to donate to the project you can via PayPal. I have had a may kind people show their support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
 <ul>
 <li><a href="https://gameservermanagers.com/#donate">Donate</a></li>
 </ul>

+ 1 - 1
lgsm/functions/check_deps.sh

@@ -73,7 +73,7 @@ fn_found_missing_deps(){
 		sleep 1
 		sudo -v > /dev/null 2>&1
 		if [ $? -eq 0 ]; then
-			fn_print_infomation_nl "Automatically installing missing dependencies."
+			fn_print_information_nl "Automatically installing missing dependencies."
 			fn_script_log_info "Automatically installing missing dependencies."
 			echo -en ".\r"
 			sleep 1

+ 1 - 1
lgsm/functions/check_glibc.sh

@@ -35,7 +35,7 @@ elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n
 		echo -e "	* glibc required: ${glibcrequired}"
 		echo -e "	* glibc installed: ${red}${glibcversion}${default}"
 		echo -en "\n"
-		fn_print_infomation "The game server will probably not work. A distro upgrade is required!"
+		fn_print_information "The game server will probably not work. A distro upgrade is required!"
 		sleep 5
 	fi
 fi

+ 2 - 2
lgsm/functions/check_ip.sh

@@ -8,7 +8,7 @@
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-if [ "${gamename}" != "TeamSpeak 3" ]; then
+if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then
 	if [ ! -f "/bin/ip" ]; then
 		ipcommand="/sbin/ip"
 	else
@@ -24,7 +24,7 @@ if [ "${gamename}" != "TeamSpeak 3" ]; then
 			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"
+			fn_print_information "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 ""

+ 37 - 12
lgsm/functions/check_permissions.sh

@@ -9,19 +9,44 @@ local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 fn_check_ownership(){
+	if [ -f "${rootdir}/${selfname}" ]; then
+		if [ $(find "${rootdir}/${selfname}" -not -user $(whoami)|wc -l) -ne "0" ]; then
+			selfownissue=1
+		fi
+	fi
+	if [ -d "${functionsdir}" ]; then
+		if [ $(find "${functionsdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then
+			funcownissue=1
+		fi
+	fi
 	if [ -d "${filesdir}" ]; then
-		if [ $(find "${filesdir}" -not -user $(whoami)|wc -l) -ne "0" ]||[ $(find "${rootdir}/${selfname}" -not -user $(whoami)|wc -l) -ne "0" ]; then
-			fn_print_fail_nl "Permissions issues found"
-			fn_script_log_fatal "Permissions issues found"
-			fn_print_infomation_nl "The current user ($(whoami)) does not have ownership of the following files:"
-			fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:"
-			{
-				echo -e "User\tGroup\tFile\n"
-				find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
-			} | column -s $'\t' -t | tee -a "${scriptlog}"
-			core_exit.sh
+		if [ $(find "${filesdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then
+			filesownissue=1
 		fi
 	fi
+	if [ "${selfownissue}" == "1" ]||[ "${funcownissue}" == "1" ]||[ "${filesownissue}" == "1" ]; then
+		fn_print_fail_nl "Ownership issues found"
+		fn_script_log_fatal "Ownership issues found"
+		fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:"
+		fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:"
+		{
+			echo -e "User\tGroup\tFile\n"
+			if [ "${selfownissue}" == "1" ]; then
+				find "${rootdir}/${selfname}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
+			fi
+			if [ "${funcownissue}" == "1" ]; then
+				find "${functionsdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
+			fi
+			if [ "${funcownissue}" == "1"  ]; then
+				find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
+			fi
+
+		} | column -s $'\t' -t | tee -a "${scriptlog}"
+		echo ""
+		fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
+		fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
+		core_exit.sh
+	fi
 }
 
 fn_check_permissions(){
@@ -29,7 +54,7 @@ fn_check_permissions(){
 		if [ $(find "${functionsdir}" -type f -not -executable|wc -l) -ne "0" ]; then
 			fn_print_fail_nl "Permissions issues found"
 			fn_script_log_fatal "Permissions issues found"
-			fn_print_infomation_nl "The following files are not executable:"
+			fn_print_information_nl "The following files are not executable:"
 			fn_script_log_info "The following files are not executable:"
 			{
 				echo -e "File\n"
@@ -49,7 +74,7 @@ fn_check_permissions(){
 		if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then
 			fn_print_fail_nl "Permissions issues found"
 			fn_script_log_fatal "Permissions issues found"
-			fn_print_infomation_nl "The following directorys does not have the correct permissions:"
+			fn_print_information_nl "The following directorys does not have the correct permissions:"
 			fn_script_log_info "The following directorys does not have the correct permissions:"
 			ls -l "${rootdir}"
 			core_exit.sh

+ 1 - 1
lgsm/functions/check_steamcmd.sh

@@ -51,7 +51,7 @@ fn_check_steamcmd_sh(){
 			fn_install_steamcmd
 		fi
 	elif [ "${function_selfname}" == "command_install.sh" ]; then
-		fn_print_infomation "SteamCMD is already installed..."
+		fn_print_information "SteamCMD is already installed..."
 		fn_print_ok_eol_nl
 	fi
 }

+ 1 - 1
lgsm/functions/command_details.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Displays server infomation.
+# Description: Displays server information.
 
 local commandname="DETAILS"
 local commandaction="Details"

+ 1 - 1
lgsm/functions/command_ts3_server_pass.sh

@@ -16,7 +16,7 @@ fn_serveradmin_password_prompt(){
 	echo "================================="
 	echo ""
 	echo "Press \"CTRL+b d\" to exit console."
-	fn_print_infomation_nl "You are about to change the ${gamename} ServerAdmin password."
+	fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password."
 	fn_print_warning_nl "${gamename} will restart during this process."
 	echo ""
 	while true; do

+ 7 - 7
lgsm/functions/core_getopt.sh

@@ -65,7 +65,7 @@ case "${getopt}" in
 		echo -e "${blue}validate\t${default}v  |Validate server files with SteamCMD."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -125,7 +125,7 @@ case "${getopt}" in
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}change-password\t${default}pw |Changes TS3 serveradmin password."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}install\t${default}i  |Install the server."
@@ -242,7 +242,7 @@ case "${getopt}" in
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}install\t${default}i  |Install the server."
 	} | column -s $'\t' -t
@@ -310,7 +310,7 @@ case "${getopt}" in
 		echo -e "${blue}validate\t${default}v  |Validate server files with SteamCMD."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -372,7 +372,7 @@ case "${getopt}" in
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -445,7 +445,7 @@ case "${getopt}" in
 		echo -e "${blue}validate\t${default}v  |Validate server files with SteamCMD."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."
@@ -510,7 +510,7 @@ case "${getopt}" in
 		echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
 		echo -e "${blue}monitor\t${default}m  |Checks that the server is running."
 		echo -e "${blue}test-alert\t${default}ta |Sends test alert."
-		echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
+		echo -e "${blue}details\t${default}dt |Displays useful information about the server."
 		echo -e "${blue}backup\t${default}b  |Create archive of the server."
 		echo -e "${blue}console\t${default}c  |Console allows you to access the live view of a server."
 		echo -e "${blue}debug\t${default}d  |See the output of the server directly to your terminal."

+ 5 - 5
lgsm/functions/core_messages.sh

@@ -249,13 +249,13 @@ fn_print_warning_nl(){
 	echo -e "${yellow}Warning!${default} $@"
 }
 
-# Infomation!
-fn_print_infomation(){
-	echo -en "${cyan}Infomation!${default} $@"
+# Information!
+fn_print_information(){
+	echo -en "${cyan}Information!${default} $@"
 }
 
-fn_print_infomation_nl(){
-	echo -e "${cyan}Infomation!${default} $@"
+fn_print_information_nl(){
+	echo -e "${cyan}Information!${default} $@"
 }
 
 # On-Screen End of Line

+ 4 - 4
lgsm/functions/info_distro.sh

@@ -7,7 +7,7 @@
 
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-### Distro infomation
+### Distro information
 
 ## Distro
 # Returns architecture, kernel and distro/os.
@@ -53,12 +53,12 @@ hours=$(( uptime/60/60%24 ))
 days=$(( uptime/60/60/24 ))
 
 
-### Performance infomation
+### Performance information
 
 ## Average server load
 load=$(uptime|awk -F 'load average: ' '{ print $2 }')
 
-## Memory Infomation
+## Memory information
 # Available RAM and swap.
 
 # Older versions of free do not support -h option.
@@ -77,7 +77,7 @@ swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}')
 swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}')
 swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}')
 
-### Disk Infomation
+### Disk information
 
 ## Available disk space on the partition.
 filesystem=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $1}')

+ 1 - 1
lgsm/functions/install_server_files.sh

@@ -82,7 +82,7 @@ fn_install_server_files_steamcmd(){
 	# Goldsource servers commonly fail to download all the server files required.
 	# Validating a few of times may reduce the chance of this issue.
 	if [ "${engine}" == "goldsource" ]; then
-		fn_print_infomation_nl "Goldsource servers commonly fail to download all the server files required. Validating a few of times may reduce the chance of this issue."
+		fn_print_information_nl "Goldsource servers commonly fail to download all the server files required. Validating a few of times may reduce the chance of this issue."
 		counter="0"
 		while [ "${counter}" -le "4" ]; do
 			counter=$((counter+1))

+ 2 - 2
lgsm/functions/update_ts3.sh

@@ -48,7 +48,7 @@ fn_update_ts3_currentbuild(){
 	fi
 
 	# Get current build from logs
-	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
+	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | sort -V | tail -1)
 	if [ -z "${currentbuild}" ]; then
 		fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found"
 		fn_script_log_error "Checking for update: teamspeak.com: Current build version not found"
@@ -194,4 +194,4 @@ else
 	fn_update_ts3_currentbuild
 	fn_update_ts3_availablebuild
 	fn_update_ts3_compare
-fi
+fi