Просмотр исходного кода

Merge pull request #2973 from GameServerManagers/hotfix/v20.4.1

Release v20.4.1
Daniel Gibbs 5 лет назад
Родитель
Сommit
242d91d937

+ 7 - 25
lgsm/config-default/config-lgsm/rustserver/_default.cfg

@@ -9,41 +9,23 @@
 #### Game Server Settings ####
 
 ## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
-# More settings available after install in serverfiles/server/rust-server/server.cfg
 ip="0.0.0.0"
 port="28015"
 rconport="28016"
 appport=28082
 rconpassword="CHANGE_ME"
-rconweb="1" # Value is: 1 for Facepunch's web panel; 0 for RCON tools like Rusty or Rustadmin
+rconweb="1" # Value is: 1 for the Facepunch web panel; 0 for RCON tools like Rusty or Rustadmin.
 servername="Rust"
 maxplayers="50"
-
-# Advanced Start Settings
-seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map
-salt="" # default random; range : unknown range ; used to recover a known setting from an existing map
-worldsize="3000" # default 3000; range : 1000 to 6000 ; map size in meters
-saveinterval="300" # Auto-save in seconds
-tickrate="30" # default 30; range : 15 to 100
+seed="" # range: 1-2147483647, used to reproduce a procedural map.
+salt="" # range: unknown, used to recover a known setting from an existing map.
+worldsize="3000" # default: 3000, range: 1000-6000, map size in meters.
+saveinterval="300" # Auto-save in seconds.
+tickrate="30" # default: 30, range: 15-100.
 
 ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 fn_parms(){
-# Specific to Rust
-if [ "${seed}" ]; then
-	# If set, then add to start parms
-	conditionalseed="+server.seed ${seed}"
-else
-	# Keep randomness of the number if not set
-	conditionalseed=""
-fi
-if [ "${salt}" ]; then
-	# If set, then add to start parms
-	conditionalsalt="+server.salt ${salt}"
-else
-	# Keep randomness of the number if not set
-	conditionalsalt=""
-fi
-parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile"
+parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile"
 }
 
 #### LinuxGSM Settings ####

+ 2 - 5
lgsm/functions/check_config.sh

@@ -20,15 +20,12 @@ fi
 if [ "${shortname}" == "rust" ]; then
 	if  [ -z "${rconpassword}" ]; then
 		fn_print_dots ""
-		fn_print_fail_nl "RCON password is not set!"
-		echo -e "  * Not setting an RCON password causes issues with ${gamename}"
+		fn_print_fail_nl "RCON password is not set"
 		fn_script_log_fatal "RCON password is not set"
-		fn_script_log_fatal "Not setting an RCON password causes issues with ${gamename}"
 		core_exit.sh
 	elif [ "${rconpassword}" == "CHANGE_ME" ]; then
 		fn_print_dots ""
-		fn_print_warn_nl "Default RCON Password detected!"
-		echo -e " * Having ${rconpassword} as a password is not very safe."
+		fn_print_warn_nl "Default RCON Password detected"
 		fn_script_log_warn "Default RCON Password detected"
 	fi
 fi

+ 15 - 13
lgsm/functions/command_wipe.sh

@@ -26,7 +26,7 @@ fn_wipe_server_files(){
 	fn_print_start_nl "Wiping server"
 	fn_script_log_info "Wiping server"
 	# Wipe procedural map.
-	if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then
 		echo -en "removing procedural map proceduralmap.*.map file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing procedural map file(s): ${serveridentitydir}/proceduralmap.*.map"
@@ -39,7 +39,7 @@ fn_wipe_server_files(){
 		fn_script_log_pass "No procedural map file to remove"
 	fi
 	# Wipe procedural map save.
-	if [ "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then
 		echo -en "removing map saves proceduralmap.*.sav file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav"
@@ -52,7 +52,7 @@ fn_wipe_server_files(){
 		fn_script_log_pass "No procedural map save to remove"
 	fi
 	# Wipe Barren map.
-	if [ "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then
 		echo -en "removing barren map barren*.map file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing map file(s): ${serveridentitydir}/barren*.map"
@@ -65,7 +65,7 @@ fn_wipe_server_files(){
 		fn_script_log_pass "No barren map file to remove"
 	fi
 	# Wipe barren map save.
-	if [ "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then
 		echo -en "removing barren map saves barren*.sav file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing barren map save(s): ${serveridentitydir}/barren*.sav"
@@ -98,7 +98,7 @@ fn_wipe_server_files(){
 		# We do not print additional information if there is nothing to remove since this might be obsolete.
 	fi
 	# Wipe sv.files.
-	if [ "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then
 		echo -en "removing server misc srv.files*.db file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing server misc files: ${serveridentitydir}/sv.files.*.db"
@@ -108,7 +108,7 @@ fn_wipe_server_files(){
 		# No further information if not found because it should I could not get this file showing up.
 	fi
 	# Wipe player death files.
-	if [ "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then
+	if [ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then
 		echo -en "removing player deaths player.deaths.*.db file(s)..."
 		fn_sleep_time
 		fn_script_log_info "Removing player death files: ${serveridentitydir}/player.deaths.*.db"
@@ -122,7 +122,7 @@ fn_wipe_server_files(){
 	fi
 	# Wipe blueprints only if full-wipe command was used.
 	if [ "${fullwipe}" == "1" ]; then
-		if [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then
+		if [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then
 			echo -en "removing blueprints player.blueprints.*.db file(s)..."
 			fn_sleep_time
 			fn_script_log_info "Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db"
@@ -134,7 +134,7 @@ fn_wipe_server_files(){
 			fn_sleep_time
 			fn_script_log_pass "No blueprint file to remove"
 		fi
-	elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then
+	elif [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then
 		echo -e "keeping blueprints"
 		fn_sleep_time
 		fn_script_log_info "Keeping blueprints"
@@ -144,8 +144,8 @@ fn_wipe_server_files(){
 		fn_script_log_pass "No blueprints found"
 	fi
 	# Wipe some logs that might be there.
-	if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then
-		echo -en "removing Log files..."
+	if [ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then
+		echo -en "removing log files..."
 		fn_sleep_time
 		fn_script_log_info "Removing log files: ${serveridentitydir}/Log.*.txt"
 		find "${serveridentitydir:?}" -type f -name "Log.*.txt" -delete
@@ -204,8 +204,10 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[
 	else
 		fn_wipe_server_files
 	fi
-	fn_print_ok_nl ""
-	fn_script_log_pass "Wiping server"
+	fn_print_complete_nl "Wiping ${selfname}"
+	fn_script_log_pass "Wiping ${selfname}"
+else
+	fn_print_ok_nl "Wipe not required"
+	fn_script_log_pass "Wipe not required"
 fi
-
 core_exit.sh

+ 19 - 19
lgsm/functions/core_dl.sh

@@ -21,7 +21,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_dl_steamcmd(){
 	fn_print_start_nl "${remotelocation}"
-	fn_script_log_info "${commandaction} server: ${remotelocation}"
+	fn_script_log_info "${commandaction} ${selfname}: ${remotelocation}"
 	if [ -n "${branch}" ]; then
 		echo -e "Branch: ${branch}"
 		fn_script_log_info "Branch: ${branch}"
@@ -91,43 +91,43 @@ fn_dl_steamcmd(){
 		if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then
 			# Not enough space.
 			if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then
-				fn_print_failure_nl "${commandaction} server: ${remotelocation}: Not enough space to download server files"
-				fn_script_log_fatal "${commandaction} server: ${remotelocation}: Not enough space to download server files"
+				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
+				fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files"
 				core_exit.sh
 			# Need tp purchase game.
 			elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then
-				fn_print_failure_nl "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game"
-				fn_script_log_fatal "${commandaction} server: ${remotelocation}: Steam account does not have a license for the required game"
+				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game"
+				fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game"
 				core_exit.sh
 			# Two-factor authentication failure
 			elif [ -n "$(grep "Two-factor code mismatch" "${steamcmdlog}" | tail -1)" ]; then
-				fn_print_failure_nl "${commandaction} server: ${remotelocation}: Two-factor authentication failure"
-				fn_script_log_fatal "${commandaction} server: ${remotelocation}: Two-factor authentication failure"
+				fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure"
+				fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Two-factor authentication failure"
 				core_exit.sh
 				# Incorrect Branch password
 				elif [ -n "$(grep "Password check for AppId" "${steamcmdlog}" | tail -1)" ]; then
-					fn_print_failure_nl "${commandaction} server: ${remotelocation}: betapassword is incorrect"
-					fn_script_log_fatal "${commandaction} server: ${remotelocation}: betapassword is incorrect"
+					fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect"
+					fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: betapassword is incorrect"
 					core_exit.sh
 			# Update did not finish.
 			elif [ -n "$(grep "0x402" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "0x602" "${steamcmdlog}" | tail -1)" ]; then
-				fn_print_error2_nl "${commandaction} server: ${remotelocation}: Update required but not completed - check network"
-				fn_script_log_error "${commandaction} server: ${remotelocation}: Update required but not completed - check network"
+				fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network"
+				fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Update required but not completed - check network"
 			else
-				fn_print_error2_nl "${commandaction} server: ${remotelocation}: Unknown error occured"
-				fn_script_log_error "${commandaction} server: ${remotelocation}: Unknown error occured"
+				fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
+				fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
 			fi
 		elif [ "${exitcode}" != "0" ]; then
-			fn_print_error2_nl "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}"
-			fn_script_log_error "${commandaction} server: ${remotelocation}: Exit code: ${exitcode}"
+			fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
+			fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
 		else
-			fn_print_complete_nl "${commandaction} server: ${remotelocation}"
-			fn_script_log_pass "${commandaction} server: ${remotelocation}"
+			fn_print_complete_nl "${commandaction} ${selfname}: ${remotelocation}"
+			fn_script_log_pass "${commandaction} ${selfname}: ${remotelocation}"
 		fi
 
 		if [ "${counter}" -gt "10" ]; then
-			fn_print_failure_nl "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys"
-			fn_script_log_fatal "${commandaction} server: ${remotelocation}: Did not complete the download, too many retrys"
+			fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys"
+			fn_script_log_fatal "${commandaction} ${selfname}: ${remotelocation}: Did not complete the download, too many retrys"
 			core_exit.sh
 		fi
 	done

+ 1 - 1
lgsm/functions/core_functions.sh

@@ -7,7 +7,7 @@
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-modulesversion="v20.4.0"
+modulesversion="v20.4.1"
 
 # Core
 

+ 3 - 3
lgsm/functions/core_getopt.sh

@@ -36,8 +36,8 @@ cmd_mods_update=( "mu;mods-update" "command_mods_update.sh" "Update installed mo
 # Server specific.
 cmd_change_password=( "pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password." )
 cmd_install_default_resources=( "ir;install-default-resources" "command_install_resources_mta.sh" "Install the MTA default resources." )
-cmd_wipe=( "wi;wipe" "command_wipe.sh" "Wipe your main game server data." )
-cmd_wipeall=( "wa;wipeall" "wipeall=1; command_wipe.sh" "Wipe your game server data and blueprints." )
+cmd_wipe=( "w;wipe;wi" "command_wipe.sh" "Map assets are wiped and blueprints are kept." )
+cmd_full_wipe=( "fw;full-wipe;wa;wipeall" "fullwipe=1; command_wipe.sh" "Map assets and blueprints are wiped." )
 cmd_map_compressor_u99=( "mc;map-compressor" "compress_ut99_maps.sh" "Compresses all ${gamename} server maps." )
 cmd_map_compressor_u2=( "mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps." )
 cmd_install_cdkey=( "cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key." )
@@ -94,7 +94,7 @@ fi
 
 # Unreal exclusive.
 if [ "${shortname}" == "rust" ]; then
-	currentopt+=( "${cmd_wipe[@]}" "${cmd_wipeall[@]}" )
+	currentopt+=( "${cmd_wipe[@]}" "${cmd_full_wipe[@]}" )
 fi
 if [ "${engine}" == "unreal2" ]; then
 	if [ "${shortname}" == "ut2k4" ]; then

+ 1 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.0"
+version="v20.4.1"
 shortname="core"
 gameservername="core"
 commandname="CORE"

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.0"
+version="v20.4.1"
 shortname="fctr"
 gameservername="fctrserver"
 commandname="CORE"

+ 1 - 1
tests/tests_jc2server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.0"
+version="v20.4.1"
 shortname="jc2"
 gameservername="jc2server"
 commandname="CORE"

+ 1 - 1
tests/tests_mcserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.0"
+version="v20.4.1"
 shortname="mc"
 gameservername="mcserver"
 commandname="CORE"

+ 1 - 1
tests/tests_ts3server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.4.0"
+version="v20.4.1"
 shortname="ts3"
 gameservername="ts3server"
 commandname="CORE"