Explorar el Código

Merge branch 'master' into develop

Daniel Gibbs hace 5 años
padre
commit
f817c4cea0

+ 2 - 2
lgsm/config-default/config-lgsm/inssserver/_default.cfg

@@ -22,9 +22,9 @@ maxplayers="28"
 fn_parms(){
 	# Allows serverpassword to work with parameters
 	if [ "${serverpassword}" != "NOT SET" ]; then
-		parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname='${servername}' -log"
+		parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname="${servername}" -log"
 	else
-		parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname='${servername}' -log"
+		parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname="${servername}" -log"
 	fi
 }
 

+ 1 - 1
lgsm/config-default/config-lgsm/momserver/_default.cfg

@@ -16,7 +16,7 @@ maxplayers="32"
 
 ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 fn_parms(){
-parms="-port=${port} -beaconport=${beaconport} -MULTIHOME="${ip}" -maxplayers=${maxplayers}"
+parms="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}"
 }
 
 #### LinuxGSM Settings ####

+ 1 - 0
lgsm/config-default/config-lgsm/mtaserver/_default.cfg

@@ -139,6 +139,7 @@ executabledir="${systemdir}"
 executable="./mta-server64"
 servercfgdir="${systemdir}/mods/deathmatch"
 servercfg="mtaserver.conf"
+servercfgdefault="mtaserver.conf"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 
 ## Backup Directory

+ 1 - 0
lgsm/config-default/config-lgsm/utserver/_default.cfg

@@ -142,6 +142,7 @@ executabledir="${systemdir}/Engine/Binaries/Linux"
 executable="./UE4Server-Linux-Shipping"
 servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer"
 servercfg="Game.ini"
+servercfgdefault"Game.ini"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 
 ## Backup Directory

+ 4 - 2
lgsm/functions/check_deps.sh

@@ -383,7 +383,7 @@ fn_deps_build_debian(){
 	# Battlefield: Vietnam
 	elif [ "${shortname}" == "bfv" ]; then
 		array_deps_required+=( libncurses5:i386 libstdc++5:i386 )
-		# Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source
+	# Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source
 	elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then
 		if [ "${arch}" == "x86_64" ]; then
 			array_deps_required+=( libtinfo5:i386 )
@@ -447,6 +447,7 @@ fn_deps_build_debian(){
 	# Wurm: Unlimited
 	elif [ "${shortname}" == "wurm" ]; then
 		array_deps_required+=( xvfb )
+	# Post Scriptum
 	elif [ "${shortname}" == "pstbs" ]; then
 		array_deps_required+=( libgconf-2-4 )
 	fi
@@ -495,7 +496,7 @@ fn_deps_build_redhat(){
 	# Battlefield: Vietnam
 	elif [ "${shortname}" == "bfv" ]; then
 		array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 )
-		# Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source
+	# Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source
 	elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then
 		array_deps_required+=( ncurses-libs.i686 )
 	# Brainbread 2, Don't Starve Together & Team Fortress 2
@@ -555,6 +556,7 @@ fn_deps_build_redhat(){
 	# Wurm: Unlimited
 	elif [ "${shortname}" == "wurm" ]; then
 		array_deps_required+=( xorg-x11-server-Xvfb )
+	# Post Scriptum
 	elif [ "${shortname}" == "pstbs" ]; then
 		array_deps_required+=( GConf2 )
 	fi

+ 1 - 1
lgsm/functions/check_steamcmd.sh

@@ -7,7 +7,7 @@
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 fn_install_steamcmd(){
-	if [ ${shortname} == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then
+	if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then
 		steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux"
 	fi
 	if [ ! -d "${steamcmddir}" ]; then

+ 0 - 1
lgsm/functions/command_console.sh

@@ -4,7 +4,6 @@
 # Website: https://linuxgsm.com
 # Description: Gives access to the server tmux console.
 
-
 commandname="CONSOLE"
 commandaction="Access console"
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

+ 2 - 2
lgsm/functions/command_update_linuxgsm.sh

@@ -78,7 +78,7 @@ if [ "${script_diff}" != "" ]; then
 		mkdir -p "${backupdir}/script"
 	fi
 	cp "${rootdir}/${selfname}" "${backupdir}/script/${selfname}-$(date +"%m_%d_%Y_%M").bak"
-	if [ $? -ne 0 ]; then
+	if [ $? != 0 ]; then
 		fn_print_fail_eol_nl
 		fn_script_log_fatal "Backup ${selfname}"
 		core_exit.sh
@@ -160,7 +160,7 @@ if [ -n "${functionsdir}" ]; then
 			else
 				curl -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1>/dev/null
 			fi
-			if [ $? -ne 0 ]; then
+			if [ $? != 0 ]; then
 				fn_print_error_eol_nl
 				fn_script_log_error "Checking ${remotereponame} module ${functionfile}"
 				echo -en "removing module ${functionfile}...\c"

+ 6 - 6
lgsm/functions/command_wipe.sh

@@ -135,13 +135,13 @@ fn_wipe_server_files(){
 			fn_script_log_pass "No blueprint file to remove"
 		fi
 	elif [ "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then
-			echo -e "keeping blueprints"
-			fn_sleep_time
-			fn_script_log_info "Keeping blueprints"
+		echo -e "keeping blueprints"
+		fn_sleep_time
+		fn_script_log_info "Keeping blueprints"
 	else
-			echo -e "no blueprints found"
-			fn_sleep_time
-			fn_script_log_pass "No blueprints found"
+		echo -e "no blueprints found"
+		fn_sleep_time
+		fn_script_log_pass "No blueprints found"
 	fi
 	# Wipe some logs that might be there.
 	if [ "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then

+ 1 - 1
lgsm/functions/core_functions.sh

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

+ 1 - 1
lgsm/functions/fix.sh

@@ -21,7 +21,7 @@ fn_fix_msg_start_nl(){
 }
 
 fn_fix_msg_end(){
-	if [ $? -ne 0 ]; then
+	if [ $? != 0 ]; then
 		fn_print_error_nl "Applying ${fixname} fix: ${gamename}"
 		fn_script_log_error "Applying ${fixname} fix: ${gamename}"
 	else

+ 5 - 5
lgsm/functions/fix_ark.sh

@@ -7,18 +7,18 @@
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # removes mulitple appworkshop_346110.acf if found.
-steamappsfilewc=$(find ${HOME} -name appworkshop_346110.acf | wc -l)
+steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)"
 if [ "${steamappsfilewc}" -gt "1" ]; then
 	fixname="multiple appworkshop acf files"
 	fn_fix_msg_start
-	find ${HOME} -name appworkshop_346110.acf -exec rm -f {} \;
+	find "${HOME}" -name appworkshop_346110.acf -exec rm -f {} \;
 	fn_fix_msg_end
 elif [ "${steamappsfilewc}" -eq "1" ]; then
 	# Steam mods directory selecter
 	# This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used
-	steamappsfile=$(find ${HOME} -name appworkshop_346110.acf)
+	steamappsfile=$(find "${HOME}" -name appworkshop_346110.acf)
 	steamappsdir=$(dirname "${steamappsfile}")
-	steamappspath=$(cd "${steamappsdir}"|| return; cd ../;pwd)
+	steamappspath=$(cd "${steamappsdir}" || return; cd ../;pwd)
 
 	# removes the symlink if exists.
 	# fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd
@@ -40,7 +40,7 @@ elif [ "${steamappsfilewc}" -eq "1" ]; then
 	fi
 
 	# if the steamapps symlink is incorrect unlink it.
-	if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${steamappspath}" ]; then
+	if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps")" != "${steamappspath}" ]; then
 		fixname="incorrect steamapps symlink"
 		fn_fix_msg_start
 		unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps"

+ 2 - 2
lgsm/functions/info_config.sh

@@ -232,8 +232,8 @@ fn_info_config_chivalry(){
 		serverpassword="${unavailable}"
 		adminpassword="${unavailable}"
         else
-		servername=$(egrep "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//')
-		adminpassword=$(egrep "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//')
+		servername=$(grep -E "^ServerName" "${servercfgfullpath}" | sed 's/^ServerName=//')
+		adminpassword=$(grep -E "^AdminPassword" "${servercfgfullpath}" | sed 's/^AdminPassword=//')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}

+ 4 - 4
lgsm/functions/install_logs.sh

@@ -15,7 +15,7 @@ fn_sleep_time
 # Create LinuxGSM logs.
 echo -en "installing log dir: ${logdir}..."
 mkdir -p "${logdir}"
-if [ $? -ne 0 ]; then
+if [ $? != 0 ]; then
 	fn_print_fail_eol_nl
 	core_exit.sh
 else
@@ -24,7 +24,7 @@ fi
 
 echo -en "installing LinuxGSM log dir: ${lgsmlogdir}..."
 mkdir -p "${lgsmlogdir}"
-if [ $? -ne 0 ]; then
+if [ $? != 0 ]; then
 	fn_print_fail_eol_nl
 	core_exit.sh
 else
@@ -32,7 +32,7 @@ else
 fi
 echo -en "creating LinuxGSM log: ${lgsmlog}..."
 touch "${lgsmlog}"
-if [ $? -ne 0 ]; then
+if [ $? != 0 ]; then
 	fn_print_fail_eol_nl
 	core_exit.sh
 else
@@ -42,7 +42,7 @@ fi
 if [ "${consolelogdir}" ]; then
 	echo -en "installing console log dir: ${consolelogdir}..."
 	mkdir -p "${consolelogdir}"
-	if [ $? -ne 0 ]; then
+	if [ $? != 0 ]; then
 		fn_print_fail_eol_nl
 		core_exit.sh
 	else

+ 3 - 3
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.3.3"
+version="v20.4.0"
 shortname="core"
 gameservername="core"
 commandname="CORE"
@@ -381,7 +381,7 @@ else
 			mkdir -p "${configdirserver}"
 			echo -en "copying _default.cfg...\c"
 			cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
-			if [ $? -ne 0 ]; then
+			if [ $? != 0 ]; then
 				echo -e "FAIL"
 				exit 1
 			else
@@ -393,7 +393,7 @@ else
 				fn_print_warn_nl "_default.cfg has altered. reloading config."
 				echo -en "copying _default.cfg...\c"
 				cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
-				if [ $? -ne 0 ]; then
+				if [ $? != 0 ]; then
 					echo -e "FAIL"
 					exit 1
 				else

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v20.3.3"
+version="v20.4.0"
 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.3.3"
+version="v20.4.0"
 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.3.3"
+version="v20.4.0"
 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.3.3"
+version="v20.4.0"
 shortname="ts3"
 gameservername="ts3server"
 commandname="CORE"