Browse Source

feat/bfv

pull/2909/head
scott 5 years ago
parent
commit
25ab4e1cd8
  1. 4
      lgsm/config-default/config-lgsm/bfvserver/_default.cfg
  2. 30
      lgsm/functions/info_config.sh
  3. 12
      lgsm/functions/info_messages.sh
  4. 7
      lgsm/functions/install_config.sh
  5. 4
      lgsm/functions/install_server_files.sh

4
lgsm/config-default/config-lgsm/bfvserver/_default.cfg

@ -10,7 +10,7 @@
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="+hostServer 1 +dedicated 1"
parms="+statusMonitor 1"
}
#### LinuxGSM Settings ####
@ -134,7 +134,7 @@ glibc="2.0"
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable="./start.sh"
servercfgdir="${systemdir}/mods/bf1942/settings"
servercfgdir="${systemdir}/mods/bfvietnam/settings"
servercfg="serversettings.con"
servercfgdefault="serversettings.con"
servercfgfullpath="${servercfgdir}/${servercfg}"

30
lgsm/functions/info_config.sh

@ -199,6 +199,33 @@ fn_info_config_bf1942(){
fi
}
fn_info_config_bfv(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
maxplayers="${zero}"
port="${zero}"
queryport="${zero}"
else
servername=$(grep "game.serverName " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverName //g' | tr -d '=\";,:' | xargs)
serverpassword=$(grep "game.serverPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/game.serverPassword//g' | tr -d '=\";,:' | xargs)
maxplayers=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]')
queryport="22000"
ip=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs)
ipsetinconfig=1
ipinconfigvar="game.serverIP"
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
maxplayers=${maxplayers:-"0"}
port=${port:-"0"}
fi
}
fn_info_config_chivalry(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
@ -1472,6 +1499,9 @@ elif [ "${shortname}" == "bt1944" ]; then
# Battlefield: 1942
elif [ "${shortname}" == "bf1942" ]; then
fn_info_config_bf1942
# Battlefield: Vietnam
elif [ "${shortname}" == "bfv" ]; then
fn_info_config_bfv
# Chivalry: Medieval Warfare
elif [ "${shortname}" == "cmw" ]; then
fn_info_config_chivalry

12
lgsm/functions/info_messages.sh

@ -982,6 +982,16 @@ fn_info_message_bf1942(){
} | column -s $'\t' -t
}
fn_info_message_bfv(){
echo -e "netstat -atunp | grep bf1942_lnxd"
echo -e ""
{
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
echo -e "> Query Steam\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
}
fn_info_message_risingworld(){
echo -e "netstat -atunp | grep java"
echo -e ""
@ -1492,6 +1502,8 @@ fn_info_message_select_engine(){
fn_info_message_mumble
elif [ "${shortname}" == "bf1942" ]; then
fn_info_message_bf1942
elif [ "${shortname}" == "bfv" ]; then
fn_info_message_bfv
elif [ "${shortname}" == "rtcw" ]; then
fn_info_message_rtcw
elif [ "${shortname}" == "rust" ]; then

7
lgsm/functions/install_config.sh

@ -239,6 +239,13 @@ elif [ "${shortname}" == "bf1942" ]; then
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "bfv" ]; then
gamedirname="BattlefieldVietnam"
array_configs+=( serversettings.con )
fn_fetch_default_config
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "bs" ]; then
gamedirname="BladeSymphony"
array_configs+=( server.cfg )

4
lgsm/functions/install_server_files.sh

@ -11,6 +11,10 @@ fn_install_server_files(){
remote_fileurl="http://linuxgsm.download/ActionHalfLife/action_halflife-1.0.tar.xz"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="61d7b79fd714888b6d65944fdaafa94a"
elif [ "${shortname}" == "bf1942" ]; then
remote_fileurl="http://linuxgsm.download/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="4223bf4ed85f5162c24b2cba51249b9e"
## temp file hosting so im not hitting main server for download
## remote_fileurl="http://linuxgsm.download/BattlefieldVietnam/bfv_linded-v1.21-20041207_patch.tar.xz"
elif [ "${shortname}" == "bfv" ];then
remote_fileurl="https://downloads.zed.rip/bfv_linded-v1.21-20041207_patch.tar.xz"; local_filedir="${tmpdir}"; local_filename="bfv_linded-v1.21-20041207_patch.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e3b4962cdd9d41e23c6fed65101bccde"
elif [ "${shortname}" == "bb" ]; then
remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz"; local_filedir="${tmpdir}"; local_filename="brainbread-v1.2-linuxserver.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="55f227183b736397806d5b6db6143f15"
elif [ "${shortname}" == "cod" ]; then

Loading…
Cancel
Save