Sfoglia il codice sorgente

mhserver: further fixes after accidental merge of wrong branch (#2347)

Daniel Gibbs 7 anni fa
parent
commit
1747e4ee94

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

@@ -17,7 +17,7 @@ defaultmap="FFA_ThePit"
 
 ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 fn_parms(){
-parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport}"
+parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport}"
 }
 
 #### LinuxGSM Settings ####

+ 0 - 133
lgsm/config-default/config-lgsm/mordhauserver/_default.cfg

@@ -1,133 +0,0 @@
-##################################
-######## Default Settings ########
-##################################
-# DO NOT EDIT WILL BE OVERWRITTEN!
-# Copy settings from here and use them in either
-# common.cfg - applies settings to every instance
-# [instance].cfg - applies settings to a specific instance
-
-#### Server Settings ####
-
-## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
-ip="0.0.0.0"
-port="7777"
-queryport="27015"
-#rconport="27020" | add to fn_params() RCONPort=${rconport}?
-maxplayers="16"
-
-## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
-fn_parms(){
-parms="\"FFA_Camp?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?Port=${port}?\""
-}
-
-#### LinuxGSM Settings ####
-
-## Notification Alerts
-# (on|off)
-
-# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info
-postalert="off"
-postdays="7"
-posttarget="https://hastebin.com"
-
-# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord
-discordalert="off"
-discordwebhook="webhook"
-
-# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
-emailalert="off"
-email="email@example.com"
-emailfrom=""
-
-# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
-iftttalert="off"
-ifttttoken="accesstoken"
-iftttevent="linuxgsm_alert"
-
-# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun
-mailgunalert="off"
-mailguntoken="accesstoken"
-mailgundomain="example.com"
-mailgunemailfrom="alert@example.com"
-mailgunemail="email@myemail.com"
-
-# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
-pushbulletalert="off"
-pushbullettoken="accesstoken"
-channeltag=""
-
-# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover
-pushoveralert="off"
-pushovertoken="accesstoken"
-
-# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram
-# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
-# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need 
-# any custom string in curl - simple ignore this parameter.
-telegramalert="off"
-telegramtoken="accesstoken"
-telegramchatid=""
-curlcustomstring=""
-
-## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
-updateonstart="off"
-
-## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup
-maxbackups="4"
-maxbackupdays="30"
-stoponbackup="on"
-
-## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
-consolelogging="on"
-logdays="7"
-
-#### LinuxGSM Advanced Settings ####
-
-## SteamCMD Settings
-# Server appid
-appid="629800"
-# Steam App Branch Select
-# Allows to opt into the various Steam app branches. Default branch is "".
-# Example: "-beta latest_experimental"
-branch=""
-
-## LinuxGSM Server Details
-# Do not edit
-gamename="Mordhau"
-engine="unreal4"
-
-#### Directories ####
-# Edit with care
-
-## Server Specific Directories
-systemdir="${serverfiles}/mordhau"
-executabledir="${systemdir}/Binaries/Linux"
-executable="./MordhauServer-Linux-Shipping"
-servercfgdir="${systemdir}/Config"
-servercfg="DefaultGame.ini"
-servercfgdefault="DefaultGame.ini"
-servercfgfullpath="${servercfgdir}/${servercfg}"
-
-## Backup Directory
-backupdir="${lgsmdir}/backup"
-
-## Logging Directories
-logdir="${rootdir}/log"
-gamelogdir="${systemdir}/Saved/Logs"
-lgsmlogdir="${logdir}/script"
-consolelogdir="${logdir}/console"
-lgsmlog="${lgsmlogdir}/${servicename}-script.log"
-consolelog="${consolelogdir}/${servicename}-console.log"
-alertlog="${lgsmlogdir}/${servicename}-alert.log"
-postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"
-
-## Logs Naming
-lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
-consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
-
-## Github Branch Select
-# Allows for the use of different function files
-# from a different repo and/or branch.
-githubuser="Viretick"
-githubrepo="LinuxGSM"
-githubbranch="custom-servers"

+ 1 - 11
lgsm/functions/info_config.sh

@@ -87,16 +87,6 @@ fn_info_config_ark(){
 	fi
 }
 
-fn_info_config_mordhau(){
-	if [ ! -f "${servercfgfullpath}" ]; then
-		servername="${unavailable}"
-	else
-		servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
-		# Not Set
-		servername=${servername:-"NOT SET"}
-	fi
-}
-
 fn_info_config_ballistic_overkill(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -1156,7 +1146,7 @@ fn_info_config_stationeers(){
 	fi
 }
 
-fn_info_config_mordhau() {
+fn_info_config_mordhau(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
 		serverpassword="${unavailable}"

+ 1 - 20
lgsm/functions/info_messages.sh

@@ -578,21 +578,6 @@ fn_info_message_ark(){
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mordhau(){
-	echo -e "netstat -atunp | grep Mordhau"
-	echo -e ""
-	{
-		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
-		echo -e "> Game\tINBOUND\t${port}\tudp"
-		# Don't do arithmetics if ever the port wasn't a numeric value
-		if [ "${port}" -eq "${port}" ]; then
-			echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
-		fi
-		echo -e "> Query\tINBOUND\t${queryport}\tudp"
-		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
-	} | column -s $'\t' -t
-}
-
 fn_info_message_ballisticoverkill(){
 	echo -e "netstat -atunp | grep BODS.x86"
 	echo -e ""
@@ -1199,11 +1184,7 @@ fn_info_message_mordhau(){
 	echo -e ""
 	{
 		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
-		echo -e "> Game\tINBOUND\t${port}\ttcp"
-		# Don't do arithmetics if ever the port wasn't a numeric value
-		if [ "${port}" -eq "${port}" ]; then
-			echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
-		fi
+		echo -e "> Game\tINBOUND\t${port}\tupd"
 		echo -e "> Query\tINBOUND\t${queryport}\tudp"
 	} | column -s $'\t' -t
 }

+ 5 - 12
lgsm/functions/info_parms.sh

@@ -22,13 +22,6 @@ fn_info_parms_ark(){
 	maxplayers=${maxplayers:-"0"}
 }
 
-fn_info_parms_mordhau(){
-	port=${port:-"0"}
-	queryport=${queryport:-"0"}
-	#rconport=${rconport:-"0"}
-	maxplayers=${maxplayers:-"0"}
-}
-
 fn_info_parms_realvirtuality(){
 	port=${port:-"0"}
 	queryport=$((port + 1))
@@ -148,12 +141,12 @@ fn_info_parms_stickybots(){
 	maxplayers=${maxplayers:-"0"}
 }
 
-fn_info_config_towerunite(){
+fn_info_parms_towerunite(){
 	port=${port:-"0"}
 	queryport=${queryport:-"0"}
 }
 
-fn_info_config_mordhau(){
+fn_info_parms_mordhau(){
 	port=${port:-"0"}
 	queryport=${queryport:-"0"}
 }
@@ -225,16 +218,16 @@ elif [ "${shortname}" == "sbots" ]; then
 	fn_info_parms_stickybots
 # Serious Sam
 elif [ "${shortname}" == "ss3" ]; then
-	fn_info_config_seriousengine35
+	fn_info_parms_seriousengine35
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	fn_info_parms_source
 # Spark
 elif [ "${engine}" == "spark" ]; then
 	fn_info_parms_spark
 elif [ "${shortname}" == "tu" ]; then
-	fn_info_config_towerunite
+	fn_info_parms_towerunite
 elif [ "${shortname}" == "mh" ]; then
-	fn_info_config_mordhau
+	fn_info_parms_mordhau
 # Unreal/Unreal 2 engine
 elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 	fn_info_parms_unreal

+ 0 - 7
lgsm/functions/install_config.sh

@@ -154,13 +154,6 @@ elif [ "${gamename}" == "ARK: Survival Evolved" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
-elif [ "${gamename}" == "Mordhau" ]; then
-	gamedirname="mordhau"
-	fn_check_cfgdir
-	array_configs+=( DefaultEngine.ini )
-	fn_fetch_default_config
-	fn_default_config_remote
-	fn_set_config_vars
 elif [ "${gamename}" == "ARMA 3" ]; then
 	gamedirname="Arma3"
 	fn_check_cfgdir