فهرست منبع

Merge pull request #1038 from GameServerManagers/development

Development
Daniel Gibbs 9 سال پیش
والد
کامیت
485b75cd27

+ 2 - 2
CounterStrike/csserver

@@ -1,5 +1,5 @@
 #!/bin/bash
-# Counter Strike
+# Counter-Strike
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
@@ -57,7 +57,7 @@ appidmod="cstrike"
 
 # Server Details
 servicename="cs-server"
-gamename="Counter Strike 1.6"
+gamename="Counter-Strike 1.6"
 engine="goldsource"
 
 # Directories

+ 2 - 2
CounterStrikeConditionZero/csczserver

@@ -1,5 +1,5 @@
 #!/bin/bash
-# Counter Strike: Condition Zero
+# Counter-Strike: Condition Zero
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
@@ -57,7 +57,7 @@ appidmod="czero"
 
 # Server Details
 servicename="cscz-server"
-gamename="Counter Strike: Condition Zero"
+gamename="Counter-Strike: Condition Zero"
 engine="goldsource"
 
 # Directories

+ 2 - 2
CounterStrikeGlobalOffensive/csgoserver

@@ -1,5 +1,5 @@
 #!/bin/bash
-# Counter Strike: Global Offensive
+# Counter-Strike: Global Offensive
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
@@ -85,7 +85,7 @@ branch=""
 
 # Server Details
 servicename="csgo-server"
-gamename="Counter Strike: Global Offensive"
+gamename="Counter-Strike: Global Offensive"
 engine="source"
 
 # Directories

+ 2 - 2
CounterStrikeSource/cssserver

@@ -1,5 +1,5 @@
 #!/bin/bash
-# Counter Strike: Source
+# Counter-Strike: Source
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
@@ -62,7 +62,7 @@ appid="232330"
 
 # Server Details
 servicename="css-server"
-gamename="Counter Strike: Source"
+gamename="Counter-Strike: Source"
 engine="source"
 
 # Directories

+ 1 - 1
Left4Dead/l4dserver

@@ -40,7 +40,7 @@ updateonstart="off"
 
 # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
 fn_parms(){
-parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} -tickrate ${tickrate} +map ${defaultmap} -maxplayers ${maxplayers}"
+parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
 }
 
 #### Advanced Variables ####

+ 1 - 1
QuakeLive/cfg/lgsm-default.cfg

@@ -13,7 +13,7 @@ set sv_mapPoolFile "mappool.txt"  // Map pool that the server will use. See defa
                                   // Built in map pools: mappool.txt, mappool_ca.txt, mappool_ctf.txt, mappool_duel.txt,
                                   //                     mappool_ffa.txt, mappool_race.txt, mappool_tdm.txt
 set g_accessFile "access.txt"      // Used to determine which 64-bit Steam IDs have admin access, or are banned.
-               
+
 set sv_maxClients "16"     // How many players can connect at once.
 set g_password ""          // Set a server-wide password, and stop all users from connecting without it.
 set sv_privateClients "0"  // Reserve slots that can be used with sv_privatePassword.

+ 0 - 0
EnemyTerritory/cfg/lgsm-default.cfg → WolfensteinEnemyTerritory/cfg/lgsm-default.cfg


+ 1 - 3
EnemyTerritory/etserver → WolfensteinEnemyTerritory/wetserver

@@ -26,11 +26,9 @@ pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Start Variables
-ip="0.0.0.0"
-port="27960"
 
 fn_parms(){
-	parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir} +exec ${servicename}.cfg"
+	parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfgfullpath}"
 }
 
 #### Advanced Variables ####

+ 4 - 4
lgsm/functions/check_deps.sh

@@ -166,8 +166,8 @@ if [ -n "$(command -v dpkg-query)" ]; then
 	# 7 Days to Die
 	elif [ "${gamename}" ==  "7 Days To Die" ]; then
 		array_deps_required+=( telnet expect )
-	# No More Room in Hell, Counter Strike: Source and Garry's Mod
-	elif [ "${gamename}" == "No More Room in Hell" ]||[ "${gamename}" == "Counter Strike: Source" ]||[ "${gamename}" == "Garry's Mod" ]; then
+	# No More Room in Hell, Counter-Strike: Source and Garry's Mod
+	elif [ "${gamename}" == "No More Room in Hell" ]||[ "${gamename}" == "Counter-Strike: Source" ]||[ "${gamename}" == "Garry's Mod" ]; then
 		if [ "${arch}" == "x86_64" ]; then
 			array_deps_required+=( lib32tinfo5 )
 		else
@@ -234,8 +234,8 @@ elif [ -n "$(command -v yum)" ]; then
 	# 7 Days to Die
 	elif [ "${gamename}" ==  "7 Days To Die" ]; then
 		array_deps_required+=( telnet expect )
-	# No More Room in Hell, Counter Strike: Source and Garry's Mod
-	elif [ "${gamename}" == "No More Room in Hell" ]||[ "${gamename}" == "Counter Strike: Source" ]||[ "${gamename}" == "Garry's Mod" ]; then
+	# No More Room in Hell, Counter-Strike: Source and Garry's Mod
+	elif [ "${gamename}" == "No More Room in Hell" ]||[ "${gamename}" == "Counter-Strike: Source" ]||[ "${gamename}" == "Garry's Mod" ]; then
 		array_deps_required+=( ncurses-libs.i686 )
 	# Brainbread 2 and Don't Starve Together
 	elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then

+ 2 - 5
lgsm/functions/command_console.sh

@@ -9,11 +9,8 @@ local commandaction="Console"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 check.sh
-echo ""
-echo "${gamename} Console"
-echo "================================="
-echo ""
-echo "Press \"CTRL+b d\" to exit console."
+fn_print_header
+fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console."
 fn_print_warning_nl "Do NOT press CTRL+c to exit."
 echo ""
 while true; do

+ 31 - 8
lgsm/functions/command_debug.sh

@@ -24,14 +24,37 @@ fix.sh
 info_distro.sh
 # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh
 fn_parms
-echo ""
-echo "${gamename} Debug"
-echo "================================="
-echo ""
-echo -e "Distro: ${distroname}"
-echo -e "Arch: ${arch}"
-echo -e "Kernel: ${kernel}"
-echo -e "Hostname: $HOSTNAME"
+fn_print_header
+echo -e "${blue}Distro:\t${default}${distroname}"
+echo -e "${blue}Arch:\t${default}${arch}"
+echo -e "${blue}Kernel:\t${default}${kernel}"
+echo -e "${blue}Hostname:\t${default}$HOSTNAME"
+echo -e "${blue}tmux:\t${default}${tmuxv}"
+echo -e "${blue}Avg Load:\t${default}${load}"
+echo -e "${blue}Free Memory:\t${default}${physmemfree}"
+echo -e "${blue}Free Disk:\t${default}${availspace}"
+# GLIBC required
+if [ -n "${glibcrequired}" ]; then
+	if [ "${glibcrequired}" == "NOT REQUIRED" ]; then
+			:
+	elif [ "${glibcrequired}" == "UNKNOWN" ]; then
+		echo -e "${blue}GLIBC required:\t${red}${glibcrequired}"
+	elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; then
+		if [ "${glibcfix}" == "yes" ]; then
+			echo -e "${blue}GLIBC required:\t${red}${glibcrequired} ${default}(${green}Using GLIBC fix${default})"
+		else
+			echo -e "${blue}GLIBC required:\t${red}${glibcrequired} ${default}(${red}GLIBC version too old${default})"
+		fi
+	else
+		echo -e "${blue}GLIBC required:\t${green}${glibcrequired}${default}"
+	fi
+fi
+# Server ip
+echo -e "${blue}Server IP:\t${default}${ip}:${port}"
+# Server password
+if [ -n "${serverpassword}" ]; then
+	echo -e "${blue}Server password:\t${default}${serverpassword}"
+fi
 echo ""
 echo "Start parameters:"
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then

+ 1 - 1
lgsm/functions/command_install.sh

@@ -28,7 +28,7 @@ fi
 
 # Configuration
 install_config.sh
-if [ "${gamename}" == "Counter Strike: Global Offensive" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "BrainBread 2" ]; then
+if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "BrainBread 2" ]; then
 	install_gslt.sh
 elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	install_ts3db.sh

+ 1 - 1
lgsm/functions/command_validate.sh

@@ -41,7 +41,7 @@ fn_validation(){
 
 fn_print_dots "Validating files:"
 sleep 0.5
-fn_print_dots_nl "Validating files: SteamCMD"
+fn_print_dots "Validating files: SteamCMD"
 sleep 1
 check.sh
 check_status.sh

+ 4 - 0
lgsm/functions/core_functions.sh

@@ -8,6 +8,10 @@
 # Fixes for legacy code
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	gamename="TeamSpeak 3"
+elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
+	gamename="Counter-Strike: Global Offensive"
+elif [ "${gamename}" == "Counter Strike: Source" ]; then
+	gamename="Counter-Strike: Source"
 fi
 
 if [ "${emailnotification}" == "on" ]; then

+ 8 - 8
lgsm/functions/core_getopt.sh

@@ -41,7 +41,7 @@ case "${getopt}" in
 		command_install.sh;;
 	ai|auto-install)
 		fn_autoinstall;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -103,7 +103,7 @@ case "${getopt}" in
 		command_install.sh;;
 	ai|auto-install)
 		fn_autoinstall;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -164,7 +164,7 @@ case "${getopt}" in
 		command_install.sh;;
 	ai|auto-install)
 		fn_autoinstall;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -220,7 +220,7 @@ case "${getopt}" in
 		command_dev_debug.sh;;
 	i|install)
 		command_install.sh;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -284,7 +284,7 @@ case "${getopt}" in
 		command_install.sh;;
 	ai|auto-install)
 		fn_autoinstall;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -351,7 +351,7 @@ case "${getopt}" in
 		fn_autoinstall;;
 	mc|map-compressor)
 		compress_ut99_maps.sh;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -419,7 +419,7 @@ case "${getopt}" in
 		command_install.sh;;
 	ai|auto-install)
 		fn_autoinstall;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;
@@ -489,7 +489,7 @@ case "${getopt}" in
 		install_ut2k4_key.sh;;
 	mc|map-compressor)
 		compress_unreal2_maps.sh;;
-	dd|deps-detect)
+	dd|detect-deps)
 		command_dev_detect_deps.sh;;
 	dg|detect-glibc)
 		command_dev_detect_glibc.sh;;

+ 17 - 7
lgsm/functions/core_messages.sh

@@ -13,16 +13,17 @@ if [ "${ansi}" != "off" ]; then
 	red="\e[31m"
 	green="\e[32m"
 	yellow="\e[33m"
+	lightyellow="\e[93m"
 	blue="\e[34m"
+	lightblue="\e[94m"
 	magenta="\e[35m"
 	cyan="\e[36m"
-	lightyellow="\e[93m"
 	# carriage return & erase to end of line
 	creeol="\r\033[K"
 fi
 
 # Log display
-##########
+########################
 ## Feb 28 14:56:58 ut99-server: Monitor:
 fn_script_log(){
 	if [ -d "${scriptlogdir}" ]; then
@@ -93,8 +94,8 @@ fn_script_log_info(){
 	fi
 }
 
-# On-Screen
-##########
+# On-Screen - Automated functions
+##################################
 
 # [ .... ]
 fn_print_dots(){
@@ -210,8 +211,17 @@ fn_print_info_nl(){
 	echo -en "\n"
 }
 
-# On-Screen full word
-##########
+# On-Screen - Interactive messages
+##################################
+
+# No More Room in Hell Debug
+# =================================
+fn_print_header(){
+	echo -e ""
+	echo -e "${gamename} ${commandaction}"
+	echo -e "=================================${default}"
+	echo -e ""
+}
 
 # Complete!
 fn_print_complete(){
@@ -259,7 +269,7 @@ fn_print_information_nl(){
 }
 
 # On-Screen End of Line
-##########
+##################################
 
 # OK
 fn_print_ok_eol(){

+ 1 - 1
lgsm/functions/fix.sh

@@ -37,7 +37,7 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
 
 	if  [ "${gamename}" == "ARMA 3" ]; then
 		fix_arma3.sh
-	elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
+	elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
 		fix_csgo.sh
 	elif [ "${gamename}" == "Don't Starve Together" ]; then
 		fix_dst.sh

+ 0 - 1
lgsm/functions/info_parms.sh

@@ -15,7 +15,6 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 unavailable="${red}UNAVAILABLE${default}"
 zero="${red}0${default}"
 
-
 fn_info_config_idtech3(){
 	# Not Set
 	port=${port:-"NOT SET"}

+ 4 - 4
lgsm/functions/install_config.sh

@@ -261,22 +261,22 @@ elif [ "${gamename}" == "Codename CURE" ]; then
 	wget -N /dev/null ${githuburl}/CodenameCURE/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
-elif [ "${gamename}" == "Counter Strike 1.6" ]; then
+elif [ "${gamename}" == "Counter-Strike 1.6" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
-elif [ "${gamename}" == "Counter Strike: Condition Zero" ]; then
+elif [ "${gamename}" == "Counter-Strike: Condition Zero" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_goldsourceconfig
-elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
+elif [ "${gamename}" == "Counter-Strike: Global Offensive" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1
 	fn_sourceconfig
-elif [ "${gamename}" == "Counter Strike: Source" ]; then
+elif [ "${gamename}" == "Counter-Strike: Source" ]; then
 	echo -e "downloading lgsm-default.cfg...\c"
 	wget -N /dev/null ${githuburl}/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1

+ 1 - 1
lgsm/functions/install_gslt.sh

@@ -12,7 +12,7 @@ echo ""
 echo "Game Server Login Token"
 echo "================================="
 sleep 1
-if [ "${gamename}" == "Counter Strike: Global Offensive" ]||[ "${gamename}" == "Counter Strike: Source" ]; then
+if [ "${gamename}" == "Counter-Strike: Global Offensive" ]||[ "${gamename}" == "Counter-Strike: Source" ]; then
 	echo "GSLT is required to run a public ${gamename} server"
 	fn_script_log_info "GSLT is required to run a public ${gamename} server"
 else