From cd67c97a18277ff904146ae02595be5901ee3944 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 21:56:39 +0100 Subject: [PATCH 01/51] Updating install config --- lgsm/functions/install_config.sh | 652 +++++++++++++------------------ 1 file changed, 271 insertions(+), 381 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 5a856f8e6..bcb0e8c68 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -8,15 +8,19 @@ local commandname="INSTALL" local commandaction="Install" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -fn_defaultconfig(){ - echo "creating ${servercfg} config file." - fn_script_log_info "creating ${servercfg} config file." - cp -v "${servercfgdefault}" "${servercfgfullpath}" - sleep 1 +fn_fetch_default_config(){ + mkdir -pv "${lgsmdir}/default-configs" + githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" + + for config in "${array_configs[@]}" + do + fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/default-configs"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" + fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + done } -fn_userinputconfig(){ - # allow user to input server name and password +# allow user to input server name and password +fn_user_input_config(){ if [ -z "${autoinstall}" ]; then echo "" echo "Configuring ${gamename} Server" @@ -25,437 +29,323 @@ fn_userinputconfig(){ read -p "Enter server name: " servername read -p "Enter rcon password: " rconpass else - servername="${servicename}" - rconpass="rconpassword" + servername="LinuxGSM" + rconpass="rcon$RANDOM" fi echo "changing hostname." fn_script_log_info "changing hostname." sed -i "s/\"\"/\"${servername}\"/g" "${servercfgfullpath}" sleep 1 echo "changing rconpassword." - fn_script_log_info "changing rconpassword." + fn_script_log_info "changing RCON password." sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgfullpath}" sleep 1 } -fn_arma3config(){ - fn_defaultconfig - echo "creating ${networkcfg} config file." - fn_script_log_info "creating ${networkcfg} config file." - cp -v "${networkcfgdefault}" "${networkcfgfullpath}" - sleep 1 - echo "" -} - -fn_goldsourceconfig(){ - fn_defaultconfig - - # server.cfg redirects to ${servercfg} for added security - echo "creating server.cfg." - fn_script_log_info "creating server.cfg." - touch "server.cfg" - sleep 1 - echo "creating redirect." - fn_script_log_info "creating redirect." - echo "server.cfg > ${servercfg}." - echo "exec ${servercfg}" > "server.cfg" - sleep 1 - - # creating other files required - echo "creating listip.cfg." - fn_script_log_info "creating listip.cfg." - touch "${systemdir}/listip.cfg" - sleep 1 - echo "creating banned.cfg." - fn_script_log_info "creating banned.cfg." - touch "${systemdir}/banned.cfg" - sleep 1 - - fn_userinputconfig - echo "" -} - -fn_serious3config(){ - fn_defaultconfig - echo "" - echo "To edit ${gamename} server config use SS3 Server GUI 3 tool" - echo "http://mrag.nl/sgui3/" - fn_script_log_info "To edit ${gamename} server config use SS3 Server GUI 3 tool" - fn_script_log_info "http://mrag.nl/sgui3/" - sleep 1 - echo "" -} - -fn_sourceconfig(){ - fn_defaultconfig - - # server.cfg redirects to ${servercfg} for added security - echo "creating server.cfg." - fn_script_log_info "creating server.cfg." - touch "server.cfg" - sleep 1 - echo "creating redirect." - fn_script_log_info "creating redirect." - echo "server.cfg > ${servercfg}." - echo "exec ${servercfg}" > "server.cfg" - sleep 1 - - fn_userinputconfig - echo "" -} - -fn_teeworldsconfig(){ - fn_defaultconfig - - echo "adding logfile location to config." - fn_script_log_info "adding logfile location to config." - sed -i "s@\"\"@\"${gamelog}\"@g" "${servercfgfullpath}" - sleep 1 - echo "removing password holder." - fn_script_log_info "removing password holder." - sed -i "s///" "${servercfgfullpath}" - sleep 1 - - fn_userinputconfig - echo "" -} - -fn_ut99config(){ - echo "creating ${servercfg} config file." - fn_script_log_info "creating ${servercfg} config file." - echo "${servercfgdefault} > ${servercfgfullpath}" - tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}" - sleep 1 - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" - sleep 1 - echo "setting WebAdmin port to 8076." - fn_script_log_info "setting WebAdmin port to 8076." - sed -i '467i\ListenPort=8076' "${servercfgfullpath}" - sleep 1 - echo "" -} - -fn_unreal2config(){ - fn_defaultconfig - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "setting WebAdmin username and password." - fn_script_log_info "setting WebAdmin username and password." - sed -i 's/AdminName=/AdminName=admin/g' "${servercfgfullpath}" - sed -i 's/AdminPassword=/AdminPassword=admin/g' "${servercfgfullpath}" +# Copys the default config from remote repo +fn_default_config_remote(){ + for config in "${array_configs[@]}" + do + echo "copying ${servercfg} config file." + fn_script_log_info "copying ${servercfg} config file." + cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + done sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" - if [ "${gamename}" == "Unreal Tournament 2004" ]; then - sleep 1 - echo "setting WebAdmin port to 8075." - fn_script_log_info "setting WebAdmin port to 8075." - sed -i 's/ListenPort=80/ListenPort=8075/g' "${servercfgfullpath}" - fi - sleep 1 - echo "" } -fn_ut3config(){ - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "setting ServerName to 'LinuxGSM UT3 Server'." - fn_script_log_info "setting ServerName to 'LinuxGSM UT3 Server'." +# Copys the default config already available +fn_default_config_local(){ + for config in "${array_configs[@]}" + do + echo "copying ${servercfg} config file." + fn_script_log_info "copying ${servercfg} config file." + cp -v "${servercfgdefault}" "${servercfgfullpath}" + done sleep 1 - sed -i 's/ServerName=/ServerName=LinuxGSM UT3 Server/g' "${servercfgdir}/DefaultGame.ini" - echo "setting WebAdmin password to admin." - fn_script_log_info "setting WebAdmin password to admin." - echo '[Engine.AccessControl]' >> "${servercfgdir}/DefaultGame.ini" - echo 'AdminPassword=admin' >> "${servercfgdir}/DefaultGame.ini" - sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=false/bEnabled=True/g' "${servercfgdir}/DefaultWeb.ini" - if [ "${gamename}" == "Unreal Tournament 3" ]; then - sleep 1 - echo "setting WebAdmin port to 8081." - fn_script_log_info "setting WebAdmin port to 8081." - sed -i 's/ListenPort=80/ListenPort=8081/g' "${servercfgdir}/DefaultWeb.ini" - fi - sleep 1 - echo "" } -fn_unrealtournament(){ - # allow user to input server name and password - if [ -z "${autoinstall}" ]; then - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - read -p "Enter server name: " servername - read -p "Enter rcon password: " rconpass - else - servername="${servicename}" - rconpass="rconpassword" - fi - echo "changing hostname." - fn_script_log_info "changing hostname." - sed -i "s/\"\"/\"${servername}\"/g" "${servercfgdir}/Game.ini" - sleep 1 - echo "changing rconpassword." - fn_script_log_info "changing rconpassword." - sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgdir}/Engine.ini" - sleep 1 - -} echo "" -if [ "${gamename}" != "Hurtworld" ]; then -echo "Creating Configs" +echo "Downloading ${gamename} Config" echo "=================================" -sleep 1 - mkdir -pv "${servercfgdir}" - cd "${servercfgdir}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" -fi - +echo "Configs from https://github.com/GameServerManagers/Game-Server-Configs" +sleep 2 if [ "${gamename}" == "7 Days To Die" ]; then - fn_defaultconfig + gamedirname="7DaysToDie" + array_configs+=( serverconfig.xml ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then - wget -N /dev/null ${githuburl}/ARKSurvivalEvolved/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - echo -e "downloading lgsm-default.ini...\c" - fn_defaultconfig + gamedirname="ARKSurvivalEvolved" + array_configs+=( GameUserSettings.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "ARMA 3" ]; then - echo -e "downloading lgsm-default.server.cfg...\c" - wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - echo -e "downloading lgsm-default.network.cfg...\c" - wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_arma3config + gamedirname="Arma3" + array_configs+=( server.cfg network.cfg ) + fn_fetch_default_config + fn_default_config_remote +elif [ "${gamename}" == "Blade Symphony" ]; then + gamedirname="BladeSymphony" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "BrainBread 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="BrainBread2" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Blade Symphony" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig + gamedirname="BlackMesa" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Codename CURE" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/CodenameCURE/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="CodenameCURE" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config 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 + gamedirname="CounterStrike" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config 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 + gamedirname="CounterStrikeConditionZero" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config 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 + gamedirname="CounterStrikeGlobalOffensive" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config 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 - fn_sourceconfig + gamedirname="CounterStrikeSource" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Day of Defeat" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig + gamedirname="DayOfDefeat" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Day of Defeat: Source" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="DayOfDefeatSource" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Day of Infamy" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfInfamy/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="DayOfInfamy" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Deathmatch Classic" ]; then + gamedirname="DeathmatchClassic" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Don't Starve Together" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/DontStarveTogether/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig + gamedirname="DontStarveTogether" + array_configs+=( Settings.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Double Action: Boogaloo" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Empires Mod" ]; then - fn_defaultconfig -elif [ "${gamename}" == "Enemy Territory" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig - echo "" + gamedirname="DoubleActionBoogaloo" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Fistful of Frags" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="FistfulofFrags" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Garry's Mod" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="GarrysMod" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "GoldenEye: Source" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="GoldenEyeSource" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Half Life: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/HalfLifeDeathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig + gamedirname="HalfLifeDeathmatch" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Half-Life Deathmatch: Source" ]; then + gamedirname="HalfLifeDeathmatchSource" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Half-Life: Opposing Force" ]; then + gamedirname="OpposingForce" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then + gamedirname="HalfLife2Deathmatch" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Insurgency" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="Insurgency" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Just Cause 2" ]; then - fn_defaultconfig + gamedirname="JustCause2" + array_configs+=( config.lua ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Killing Floor" ]; then - fn_unreal2config + gamedirname="KillingFloor" + array_configs+=( Default.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Left 4 Dead" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="Left4Dead" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Left 4 Dead" ]; then + gamedirname="Left4Dead" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Left 4 Dead 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="Left4Dead2" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Minecraft" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/Minecraft/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig + gamedirname="Minecraft" + array_configs+=( server.properties ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "No More Room in Hell" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="NoMoreRoominHell" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config +elif [ "${gamename}" == "Mumble" ]; then + : elif [ "${gamename}" == "Natural Selection 2" ]; then - echo -e "no configs required." - sleep 1 - echo "" + : +elif [ "${gamename}" == "NS2: Combat" ]; then + : elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/PiratesVikingandKnightsII/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="PiratesVikingandKnightsII" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Project Zomboid" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig + gamedirname="ProjectZomboid" + array_configs+=( server.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Quake Live" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig + gamedirname="QuakeLive" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then - fn_unreal2config -elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_serious3config + : +elif [ "${gamename}" == "Ricochet" ]; then + gamedirname="Ricochet" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_user_input_config elif [ "${gamename}" == "Rust" ]; then - echo -e "downloading server.cfg...\c" - wget -N /dev/null ${githuburl}/Rust/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Sven Co-op" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig + gamedirname="Rust" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote +elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then + gamedirname="SeriousSam3BFE" + array_configs+=( server.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Starbound" ]; then - echo -e "downloading lgsm-default.config...\c" - wget -N /dev/null ${githuburl}/Starbound/cfg/lgsm-default.config 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig -elif [ "${gamename}" == "TeamSpeak 3" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig + gamedirname="Starbound" + array_configs+=( starbound.config ) + fn_fetch_default_config + fn_default_config_remote +elif [ "${gamename}" == "Sven Co-op" ]; then + gamedirname="SvenCoop" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Team Fortress 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig + gamedirname="TeamFortress2" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Team Fortress Classic" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig + gamedirname="TeamFortressClassic" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote +elif [ "${gamename}" == "TeamSpeak 3" ]; then + gamedirname="TeamSpeak3" + array_configs+=( ts3server.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Teeworlds" ]; then - echo -e "downloading ctf.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/ctf.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading dm.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/dm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading duel.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/duel.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading tdm.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/tdm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_teeworldsconfig + gamedirname="Teeworlds" + array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Terraria" ]; then - echo -e "downloading lgsm-default.txt...\c" - wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig + gamedirname="Terraria" + array_configs+=( serverconfig.txt ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament" ]; then - echo -e "downloading Engine.ini...\c" - wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Engine.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading Game.ini...\c" - wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Game.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_unrealtournament -elif [ "${gamename}" == "Unreal Tournament 3" ]; then - fn_ut3config + : elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - fn_unreal2config + : +elif [ "${gamename}" == "Unreal Tournament 3" ]; then + : elif [ "${gamename}" == "Unreal Tournament 99" ]; then - fn_ut99config + gamedirname="UnrealTournament99" + array_configs+=( Game.ini Engine.ini ) + fn_fetch_default_config + fn_default_config_remote +elif [ "${gamename}" == "Enemy Territory" ]; then + gamedirname="WolfensteinEnemyTerritory" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote fi + From d95c63028324648c9fb3a0069aedd4c25b0f5643 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 22:11:40 +0100 Subject: [PATCH 02/51] more development --- lgsm/functions/install_config.sh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index bcb0e8c68..5a9e26e6b 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -42,33 +42,29 @@ fn_user_input_config(){ sleep 1 } -# Copys the default config from remote repo +# Copys the default configs from Game-Server-Configs repo to the +# correct location fn_default_config_remote(){ for config in "${array_configs[@]}" do + # every config is copied echo "copying ${servercfg} config file." fn_script_log_info "copying ${servercfg} config file." - cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + if [ "${config}" == "${servercfgdefault}" ]; then + cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + else + cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}" + fi done + # the main config is renamed to the script default + cp -v "${servercfgdefault}" "${servercfgfullpath}" sleep 1 } -# Copys the default config already available -fn_default_config_local(){ - for config in "${array_configs[@]}" - do - echo "copying ${servercfg} config file." - fn_script_log_info "copying ${servercfg} config file." - cp -v "${servercfgdefault}" "${servercfgfullpath}" - done - sleep 1 -} - - echo "" echo "Downloading ${gamename} Config" echo "=================================" -echo "Configs from https://github.com/GameServerManagers/Game-Server-Configs" +echo "default configs from https://github.com/GameServerManagers/Game-Server-Configs" sleep 2 if [ "${gamename}" == "7 Days To Die" ]; then gamedirname="7DaysToDie" From 2c9eabb178f561b2ef8da94294b0c9c6ca18deee Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 22:21:58 +0100 Subject: [PATCH 03/51] dev --- lgsm/functions/install_config.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 5a9e26e6b..e91c8d969 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -56,8 +56,6 @@ fn_default_config_remote(){ cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}" fi done - # the main config is renamed to the script default - cp -v "${servercfgdefault}" "${servercfgfullpath}" sleep 1 } From 711a61a4d8f203186c7af579d7cf5cd77f1ded63 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 22:35:15 +0100 Subject: [PATCH 04/51] dev --- lgsm/functions/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index e91c8d969..db28b2b87 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -316,7 +316,7 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Teeworlds" ]; then - gamedirname="Teeworlds" + gamedirname="TeeWorlds" array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg ) fn_fetch_default_config fn_default_config_remote From b54876035c6e6e8957f9fcd70e4eec1396cc0302 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 22:41:11 +0100 Subject: [PATCH 05/51] added info_config.sh to debug --- lgsm/functions/command_debug.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index f6958a8be..98bd3082c 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -22,6 +22,7 @@ fn_lockfile_trap(){ check.sh fix.sh info_distro.sh +info_config.sh # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh fn_parms fn_print_header From 398cda0ff84cb22460c9be97cb2c65cfa3600293 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 23:43:39 +0100 Subject: [PATCH 06/51] update bf1942 dl location --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index e1b140bb8..bb13a56d0 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -16,7 +16,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 3" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c" elif [ "${gamename}" == "Battlefield: 1942" ]; then - fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="7e9d2538a62b228f2de7176b44659aa9" + fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bzip2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Enemy Territory" ]; then fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="ded32053e470fe15d9403ec4a0ab7e89" elif [ "${gamename}" == "Unreal Tournament" ]; then From 82fbb9ea76162db90b61e008179c8fb1974fea89 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 8 Oct 2016 23:47:47 +0100 Subject: [PATCH 07/51] corrected bg1942 name --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index bb13a56d0..58611b10e 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -16,7 +16,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 3" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c" elif [ "${gamename}" == "Battlefield: 1942" ]; then - fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bzip2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" + fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Enemy Territory" ]; then fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="ded32053e470fe15d9403ec4a0ab7e89" elif [ "${gamename}" == "Unreal Tournament" ]; then From 79fe18d551c264df8ec71424260328aa98879c6e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:14:20 +0100 Subject: [PATCH 08/51] Added BF1942 --- Battlefield1942/bf1942server | 5 +++-- lgsm/functions/command_details.sh | 16 ++++++++++++--- lgsm/functions/info_config.sh | 33 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 97851c553..decb4c34d 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -38,8 +38,8 @@ parms=" +hostServer 1 +dedicated 1" # Github Branch Select # Allows for the use of different function files # from a different repo and/or branch. -githubuser="dgibbs64" -githubrepo="linuxgsm" +githubuser="GameServerManagers" +githubrepo="LinuxGSM" githubbranch="master" # Server Details @@ -60,6 +60,7 @@ systemdir="${filesdir}" executabledir="${systemdir}" executable="./start.sh" servercfg="serversettings.con" +servercfgdefault="serversettings.con" servercfgdir="${systemdir}/mods/bf1942/settings" servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index fe7bfa154..0cfd04b95 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -374,6 +374,16 @@ fn_details_realvirtuality(){ } | column -s $'\t' -t } +fn_details_refractor(){ + echo -e "netstat -atunp | grep bf1942_lnxd" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_details_idtech3(){ echo -e "netstat -atunp | grep qzeroded" echo -e "" @@ -599,7 +609,7 @@ fn_display_details() { fn_details_commandlineparms fi fn_details_ports - + # Display details depending on game or engine. if [ "${engine}" == "avalanche" ]; then fn_details_avalanche @@ -642,12 +652,12 @@ fn_display_details() { else fn_print_error_nl "Unable to detect server engine." fi - + fn_details_statusbottom } if [ -z "${postdetails}" ] ; -then +then fn_display_details core_exit.sh fi diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 8e339ffde..477de1556 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -41,6 +41,36 @@ fn_info_config_avalanche(){ fi } +fn_info_config_bf1942(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + serverpassword="${unavailable}" + slots="${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) + slots=$(grep "game.serverMaxPlayers" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + port=$(grep "game.serverPort" "${servercfgfullpath}" | grep -v "\--" | tr -cd '[:digit:]') + queryport="22000" + + # Not Set + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + slots=${slots:-"0"} + port=${port:-"0"} + + # check if the ip exists in the config file. Failing this will fall back to the default. + ipconfigcheck=$(grep "game.serverIP" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/game.serverIP//g' | tr -d '=\";,:' | xargs) + if [ -n "${ipconfigcheck}" ]; then + ip="${ipconfigcheck}" + fi + fi +} + + fn_info_config_dontstarve(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -418,6 +448,9 @@ fn_info_config_sdtd(){ # Just Cause 2 if [ "${engine}" == "avalanche" ]; then fn_info_config_avalanche +# Battlefield: 1942 +elif [ "${gamename}" == "Battlefield: 1942" ]; then + fn_info_config_bf1942 # Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve From c92e84c9c0944988088d8f22fa8ec7d2efcfc3f7 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:14:37 +0100 Subject: [PATCH 09/51] Updated for BF1942 --- lgsm/functions/gsquery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index 76d5478d9..fcac90438 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -25,6 +25,8 @@ class GameServer: self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'realvirtuality': self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + elif self.option.engine == 'refractor': + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unity3d': self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'idtech3': @@ -103,7 +105,7 @@ if __name__ == '__main__': action = 'store', dest = 'engine', default = False, - help = 'Engine type: avalanche, goldsource, idtech3, realvirtuality, spark, source, unity3d, unreal, unreal2.' + help = 'Engine type: avalanche, goldsource, idtech3, realvirtuality, refractor, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', From d9c09be1a990272bd103be0bf5e8d7d6d27eacea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:17:34 +0100 Subject: [PATCH 10/51] added BF1942 --- lgsm/functions/install_config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index db28b2b87..95bf65124 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -52,6 +52,9 @@ fn_default_config_remote(){ fn_script_log_info "copying ${servercfg} config file." if [ "${config}" == "${servercfgdefault}" ]; then cp -v "${lgsmdir}/default-configs/${config}" "${servercfgfullpath}" + elif [ "${config}" == "${networkcfgdefault}" ]; then + # ARMA 3 + cp -v "${lgsmdir}/default-configs/${config}" "${networkcfgfullpath}" else cp -v "${lgsmdir}/default-configs/${config}" "${servercfgdir}/${config}" fi @@ -79,6 +82,11 @@ elif [ "${gamename}" == "ARMA 3" ]; then array_configs+=( server.cfg network.cfg ) fn_fetch_default_config fn_default_config_remote +elif [ "${gamename}" == "Battlefield: 1942" ]; then + gamedirname="Battlefield1942" + array_configs+=( serversettings.con ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Blade Symphony" ]; then gamedirname="BladeSymphony" array_configs+=( server.cfg ) From d97bc144aaa22369ef673818ba884abe1d1696c0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:27:57 +0100 Subject: [PATCH 11/51] added bf1942 --- ARKSurvivalEvolved/arkserver | 2 +- Arma3/arma3server | 4 +- BlackMesa/bmdmserver | 2 +- lgsm/functions/alert_pushbullet.sh | 2 +- lgsm/functions/command_details.sh | 2 + lgsm/functions/install_config.sh.old.sh | 465 ++++++++++++++++++++++++ 6 files changed, 472 insertions(+), 5 deletions(-) create mode 100644 lgsm/functions/install_config.sh.old.sh diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index 905a48b78..efba11b51 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -81,7 +81,7 @@ executable="./ShooterGameServer" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="GameUserSettings.ini" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.ini" +servercfgdefault="${servercfgdir}/GameUserSettings.ini" backupdir="${rootdir}/backups" # Logging diff --git a/Arma3/arma3server b/Arma3/arma3server index a27a49be2..62a760104 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -91,11 +91,11 @@ executabledir="${filesdir}" executable="./arma3server" servercfg="${servicename}.server.cfg" networkcfg="${servicename}.network.cfg" +servercfgdefault="server.cfg" +networkcfgdefault="network.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" networkcfgfullpath="${servercfgdir}/${networkcfg}" -servercfgdefault="${servercfgdir}/lgsm-default.server.cfg" -networkcfgdefault="${servercfgdir}/lgsm-default.network.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index c28e35b1d..91fe6bb56 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -84,9 +84,9 @@ systemdir="${filesdir}/bms" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/lgsm/functions/alert_pushbullet.sh b/lgsm/functions/alert_pushbullet.sh index 221701a7d..aecf3d875 100644 --- a/lgsm/functions/alert_pushbullet.sh +++ b/lgsm/functions/alert_pushbullet.sh @@ -11,7 +11,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_print_dots "Sending Pushbullet alert" sleep 1 -pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq) +pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d channel_tag="${channeltag}" -d type="note" -d body="${alertbody}" -d title="${alertsubject}" 'https://api.pushbullet.com/v2/pushes'|grep -o invalid_access_token|uniq) if [ "${pushbulletsend}" == "invalid_access_token" ]; then fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 0cfd04b95..46273df97 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -613,6 +613,8 @@ fn_display_details() { # Display details depending on game or engine. if [ "${engine}" == "avalanche" ]; then fn_details_avalanche + elif [ "${engine}" == "refractor" ]; then + fn_details_refractor elif [ "${engine}" == "dontstarve" ]; then fn_details_dontstarve elif [ "${engine}" == "lwjgl2" ]; then diff --git a/lgsm/functions/install_config.sh.old.sh b/lgsm/functions/install_config.sh.old.sh new file mode 100644 index 000000000..7ac97a6fe --- /dev/null +++ b/lgsm/functions/install_config.sh.old.sh @@ -0,0 +1,465 @@ +#!/bin/bash +# LGSM install_config.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Creates default server configs. + +local commandname="INSTALL" +local commandaction="Install" +local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" + +fn_defaultconfig(){ + echo "creating ${servercfg} config file." + fn_script_log_info "creating ${servercfg} config file." + cp -v "${servercfgdefault}" "${servercfgfullpath}" + sleep 1 +} + +fn_userinputconfig(){ + # allow user to input server name and password + if [ -z "${autoinstall}" ]; then + echo "" + echo "Configuring ${gamename} Server" + echo "=================================" + sleep 1 + read -p "Enter server name: " servername + read -p "Enter rcon password: " rconpass + else + servername="${servicename}" + rconpass="rconpassword" + fi + echo "changing hostname." + fn_script_log_info "changing hostname." + sed -i "s/\"\"/\"${servername}\"/g" "${servercfgfullpath}" + sleep 1 + echo "changing rconpassword." + fn_script_log_info "changing rconpassword." + sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgfullpath}" + sleep 1 +} + +fn_arma3config(){ + fn_defaultconfig + echo "creating ${networkcfg} config file." + fn_script_log_info "creating ${networkcfg} config file." + cp -v "${networkcfgdefault}" "${networkcfgfullpath}" + sleep 1 + echo "" +} + +fn_goldsourceconfig(){ + fn_defaultconfig + + # server.cfg redirects to ${servercfg} for added security + echo "creating server.cfg." + fn_script_log_info "creating server.cfg." + touch "server.cfg" + sleep 1 + echo "creating redirect." + fn_script_log_info "creating redirect." + echo "server.cfg > ${servercfg}." + echo "exec ${servercfg}" > "server.cfg" + sleep 1 + + # creating other files required + echo "creating listip.cfg." + fn_script_log_info "creating listip.cfg." + touch "${systemdir}/listip.cfg" + sleep 1 + echo "creating banned.cfg." + fn_script_log_info "creating banned.cfg." + touch "${systemdir}/banned.cfg" + sleep 1 + + fn_userinputconfig + echo "" +} + +fn_serious3config(){ + fn_defaultconfig + echo "" + echo "To edit ${gamename} server config use SS3 Server GUI 3 tool" + echo "http://mrag.nl/sgui3/" + fn_script_log_info "To edit ${gamename} server config use SS3 Server GUI 3 tool" + fn_script_log_info "http://mrag.nl/sgui3/" + sleep 1 + echo "" +} + +fn_sourceconfig(){ + fn_defaultconfig + # server.cfg redirects to ${servercfg} for added security + echo "creating server.cfg." + fn_script_log_info "creating server.cfg." + touch "server.cfg" + sleep 1 + echo "creating redirect." + fn_script_log_info "creating redirect." + echo "server.cfg > ${servercfg}." + echo "exec ${servercfg}" > "server.cfg" + sleep 1 + fn_userinputconfig + echo "" +} + +fn_teeworldsconfig(){ + fn_defaultconfig + + echo "adding logfile location to config." + fn_script_log_info "adding logfile location to config." + sed -i "s@\"\"@\"${gamelog}\"@g" "${servercfgfullpath}" + sleep 1 + echo "removing password holder." + fn_script_log_info "removing password holder." + sed -i "s///" "${servercfgfullpath}" + sleep 1 + + fn_userinputconfig + echo "" +} + +fn_ut99config(){ + echo "creating ${servercfg} config file." + fn_script_log_info "creating ${servercfg} config file." + echo "${servercfgdefault} > ${servercfgfullpath}" + tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}" + sleep 1 + echo "" + echo "Configuring ${gamename} Server" + echo "=================================" + sleep 1 + echo "enabling WebAdmin." + fn_script_log_info "enabling WebAdmin." + sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" + sleep 1 + echo "setting WebAdmin port to 8076." + fn_script_log_info "setting WebAdmin port to 8076." + sed -i '467i\ListenPort=8076' "${servercfgfullpath}" + sleep 1 + echo "" +} + +fn_unreal2config(){ + fn_defaultconfig + echo "" + echo "Configuring ${gamename} Server" + echo "=================================" + sleep 1 + echo "setting WebAdmin username and password." + fn_script_log_info "setting WebAdmin username and password." + sed -i 's/AdminName=/AdminName=admin/g' "${servercfgfullpath}" + sed -i 's/AdminPassword=/AdminPassword=admin/g' "${servercfgfullpath}" + sleep 1 + echo "enabling WebAdmin." + fn_script_log_info "enabling WebAdmin." + sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" + if [ "${gamename}" == "Unreal Tournament 2004" ]; then + sleep 1 + echo "setting WebAdmin port to 8075." + fn_script_log_info "setting WebAdmin port to 8075." + sed -i 's/ListenPort=80/ListenPort=8075/g' "${servercfgfullpath}" + fi + sleep 1 + echo "" +} + +fn_ut3config(){ + echo "" + echo "Configuring ${gamename} Server" + echo "=================================" + sleep 1 + echo "setting ServerName to 'LinuxGSM UT3 Server'." + fn_script_log_info "setting ServerName to 'LinuxGSM UT3 Server'." + sleep 1 + sed -i 's/ServerName=/ServerName=LinuxGSM UT3 Server/g' "${servercfgdir}/DefaultGame.ini" + echo "setting WebAdmin password to admin." + fn_script_log_info "setting WebAdmin password to admin." + echo '[Engine.AccessControl]' >> "${servercfgdir}/DefaultGame.ini" + echo 'AdminPassword=admin' >> "${servercfgdir}/DefaultGame.ini" + sleep 1 + echo "enabling WebAdmin." + fn_script_log_info "enabling WebAdmin." + sed -i 's/bEnabled=false/bEnabled=True/g' "${servercfgdir}/DefaultWeb.ini" + if [ "${gamename}" == "Unreal Tournament 3" ]; then + sleep 1 + echo "setting WebAdmin port to 8081." + fn_script_log_info "setting WebAdmin port to 8081." + sed -i 's/ListenPort=80/ListenPort=8081/g' "${servercfgdir}/DefaultWeb.ini" + fi + sleep 1 + echo "" +} + +fn_unrealtournament(){ + # allow user to input server name and password + if [ -z "${autoinstall}" ]; then + echo "" + echo "Configuring ${gamename} Server" + echo "=================================" + sleep 1 + read -p "Enter server name: " servername + read -p "Enter rcon password: " rconpass + else + servername="${servicename}" + rconpass="rconpassword" + fi + echo "changing hostname." + fn_script_log_info "changing hostname." + sed -i "s/\"\"/\"${servername}\"/g" "${servercfgdir}/Game.ini" + sleep 1 + echo "changing rconpassword." + fn_script_log_info "changing rconpassword." + sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgdir}/Engine.ini" + sleep 1 + +} + +echo "" +if [ "${gamename}" != "Hurtworld" ]; then +echo "Creating Configs" +echo "=================================" +sleep 1 + mkdir -pv "${servercfgdir}" + cd "${servercfgdir}" + githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" +fi + + + elif [ "${gamename}" == "GoldenEye: Source" ]; then + fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" + fi + fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + +if [ "${gamename}" == "7 Days To Die" ]; then + fn_defaultconfig +elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then + wget -N /dev/null ${githuburl}/ARKSurvivalEvolved/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + echo -e "downloading lgsm-default.ini...\c" + fn_defaultconfig +elif [ "${gamename}" == "ARMA 3" ]; then + echo -e "downloading lgsm-default.server.cfg...\c" + wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + echo -e "downloading lgsm-default.network.cfg...\c" + wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_arma3config +elif [ "${gamename}" == "BrainBread 2" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Blade Symphony" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_goldsourceconfig +elif [ "${gamename}" == "Codename CURE" ]; then + echo -e "downloading lgsm-default.cfg...\c" + 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 + 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 + 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 + 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 + 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 + fn_sourceconfig +elif [ "${gamename}" == "Day of Defeat" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_goldsourceconfig +elif [ "${gamename}" == "Day of Defeat: Source" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Day of Infamy" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/DayOfInfamy/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Don't Starve Together" ]; then + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/DontStarveTogether/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "Double Action: Boogaloo" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Empires Mod" ]; then + fn_defaultconfig +elif [ "${gamename}" == "Enemy Territory" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig + fn_userinputconfig + echo "" +elif [ "${gamename}" == "Fistful of Frags" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Garry's Mod" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "GoldenEye: Source" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Half Life: Deathmatch" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/HalfLifeDeathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_goldsourceconfig +elif [ "${gamename}" == "Insurgency" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Just Cause 2" ]; then + fn_defaultconfig +elif [ "${gamename}" == "Killing Floor" ]; then + fn_unreal2config +elif [ "${gamename}" == "Left 4 Dead" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Left 4 Dead 2" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Minecraft" ]; then + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/Minecraft/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "No More Room in Hell" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Natural Selection 2" ]; then + echo -e "no configs required." + sleep 1 + echo "" +elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/PiratesVikingandKnightsII/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Project Zomboid" ]; then + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "Quake Live" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig + fn_userinputconfig +elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then + fn_unreal2config +elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_serious3config +elif [ "${gamename}" == "Rust" ]; then + echo -e "downloading server.cfg...\c" + wget -N /dev/null ${githuburl}/Rust/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "Sven Co-op" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_goldsourceconfig +elif [ "${gamename}" == "Starbound" ]; then + echo -e "downloading lgsm-default.config...\c" + wget -N /dev/null ${githuburl}/Starbound/cfg/lgsm-default.config 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig + fn_userinputconfig +elif [ "${gamename}" == "TeamSpeak 3" ]; then + echo -e "downloading lgsm-default.ini...\c" + wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "Team Fortress 2" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_sourceconfig +elif [ "${gamename}" == "Team Fortress Classic" ]; then + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_goldsourceconfig +elif [ "${gamename}" == "Teeworlds" ]; then + echo -e "downloading ctf.cfg...\c" + wget -N /dev/null ${githuburl}/Teeworlds/cfg/ctf.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + echo -e "downloading dm.cfg...\c" + wget -N /dev/null ${githuburl}/Teeworlds/cfg/dm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + echo -e "downloading duel.cfg...\c" + wget -N /dev/null ${githuburl}/Teeworlds/cfg/duel.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + echo -e "downloading tdm.cfg...\c" + wget -N /dev/null ${githuburl}/Teeworlds/cfg/tdm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + echo -e "downloading lgsm-default.cfg...\c" + wget -N /dev/null ${githuburl}/Teeworlds/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_teeworldsconfig +elif [ "${gamename}" == "Terraria" ]; then + echo -e "downloading lgsm-default.txt...\c" + wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_defaultconfig +elif [ "${gamename}" == "Unreal Tournament" ]; then + echo -e "downloading Engine.ini...\c" + wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Engine.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + echo -e "downloading Game.ini...\c" + wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Game.ini 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_unrealtournament +elif [ "${gamename}" == "Unreal Tournament 3" ]; then + fn_ut3config +elif [ "${gamename}" == "Unreal Tournament 2004" ]; then + fn_unreal2config +elif [ "${gamename}" == "Unreal Tournament 99" ]; then + fn_ut99config +fi From 35e6eab78f1a4c7739fe1fb8e24054d04b2197f4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:37:41 +0100 Subject: [PATCH 12/51] Added bf1942 --- lgsm/functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 46273df97..cd01e9adb 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -290,7 +290,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then From e8953ab0418bba4c11de1cce9a283d341c465fd4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:42:55 +0100 Subject: [PATCH 13/51] added bf1942 --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 0d9a916c1..4052a17db 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche goldsource realvirtuality source spark unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche goldsource refractor realvirtuality source spark unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then From dab7264d7bf16f7b9386d1b552175ce88c43a862 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:49:04 +0100 Subject: [PATCH 14/51] Added bf1942 --- lgsm/functions/core_getopt.sh | 67 +++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index aed1890b2..d56e87c88 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -80,6 +80,71 @@ case "${getopt}" in esac } +fn_getopt_bf1942(){ +case "${getopt}" in + st|start) + command_start.sh;; + sp|stop) + command_stop.sh;; + r|restart) + command_restart.sh;; + uf|update-functions) + command_update_functions.sh;; + m|monitor) + command_monitor.sh;; + ta|test-alert) + command_test_alert.sh;; + dt|details) + command_details.sh;; + pd|postdetails) + command_postdetails.sh;; + b|backup) + command_backup.sh;; + c|console) + command_console.sh;; + d|debug) + command_debug.sh;; + dev|dev-debug) + command_dev_debug.sh;; + i|install) + command_install.sh;; + ai|auto-install) + fn_autoinstall;; + dd|detect-deps) + command_dev_detect_deps.sh;; + dg|detect-glibc) + command_dev_detect_glibc.sh;; + dl|detect-ldd) + command_dev_detect_ldd.sh;; + *) + if [ -n "${getopt}" ]; then + echo -e "${red}Unknown command${default}: $0 ${getopt}" + exitcode=2 + fi + echo "Usage: $0 [option]" + echo "${gamename} - Linux Game Server Manager - Version ${version}" + echo "https://gameservermanagers.com/${selfname}" + echo -e "" + echo -e "${lightyellow}Commands${default}" + { + echo -e "${blue}start\t${default}st |Start the server." + echo -e "${blue}stop\t${default}sp |Stop the server." + echo -e "${blue}restart\t${default}r |Restart the server." + echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." + echo -e "${blue}monitor\t${default}m |Checks that the server is running." + echo -e "${blue}test-alert\t${default}ta |Sends test alert." + echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." + echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)" + echo -e "${blue}backup\t${default}b |Create archive of the server." + echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." + echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." + echo -e "${blue}install\t${default}i |Install the server." + echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts." + } | column -s $'\t' -t + esac +} + + fn_getopt_teamspeak3(){ case "${getopt}" in st|start) @@ -554,6 +619,8 @@ case "${getopt}" in if [ "${gamename}" == "Mumble" ]; then fn_getopt_mumble +elif [ "${gamename}" == "Battlefield: 1942" ]; then + fn_getopt_bf1942 elif [ "${engine}" == "lwjgl2" ]; then fn_getopt_minecraft elif [ "${gamename}" == "TeamSpeak 3" ]; then From aea01769cebf3067bf42c3b721d524e0bedef6ff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 00:56:23 +0100 Subject: [PATCH 15/51] removed IP as in config file --- Battlefield1942/bf1942server | 1 - 1 file changed, 1 deletion(-) diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index decb4c34d..72111ab81 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -27,7 +27,6 @@ pushbulletalert="off" pushbullettoken="accesstoken" # Start Variables -ip="0.0.0.0" fn_parms(){ parms=" +hostServer 1 +dedicated 1" From 85397a012402c04ae31bb43da3096163287e536c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 13:37:39 +0100 Subject: [PATCH 16/51] Starbound glibc requirements increased to 2.17 --- lgsm/functions/info_glibc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 9ec7878e2..207d96ed3 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -75,7 +75,7 @@ elif [ "${engine}" == "spark" ]; then glibcrequired="2.15" glibcfix="yes" elif [ "${engine}" == "starbound" ]; then - glibcrequired="2.12" + glibcrequired="2.17" glibcfix="no" elif [ "${engine}" == "terraria" ]; then glibcrequired="2.7" From 87c50840579b02522056ba1798bf91130cb82909 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 20:05:18 +0100 Subject: [PATCH 17/51] Updated servercfgdefault --- BladeSymphony/bsserver | 2 +- BrainBread2/bb2server | 2 +- CodenameCURE/ccserver | 2 +- CounterStrike/csserver | 2 +- CounterStrikeConditionZero/csczserver | 2 +- CounterStrikeGlobalOffensive/csgoserver | 2 +- CounterStrikeSource/cssserver | 2 +- DayOfDefeat/dodserver | 2 +- DayOfDefeatSource/dodsserver | 2 +- DayOfInfamy/doiserver | 2 +- DeathmatchClassic/dmcserver | 2 +- DontStarveTogether/dstserver | 1 + DoubleActionBoogaloo/dabserver | 2 +- EmpiresMod/emserver | 2 +- FistfulOfFrags/fofserver | 2 +- GarrysMod/gmodserver | 2 +- GoldenEyeSource/gesserver | 2 +- HalfLife2Deathmatch/hl2dmserver | 2 +- HalfLifeDeathmatch/hldmserver | 2 +- HalfLifeDeathmatchSource/hldmsserver | 2 +- Insurgency/insserver | 2 +- JustCause2/jc2server | 1 + KillingFloor/kfserver | 2 +- Left4Dead/l4dserver | 2 +- Left4Dead2/l4d2server | 2 +- Minecraft/mcserver | 1 + Mumble/mumbleserver | 1 + NoMoreRoomInHell/nmrihserver | 2 +- OpposingForce/opforserver | 2 +- PiratesVikingandKnightsII/pvkiiserver | 2 +- ProjectZomboid/pzserver | 4 ++-- QuakeLive/qlserver | 2 +- RedOrchestra/roserver | 2 +- Ricochet/ricochetserver | 2 +- Rust/rustserver | 2 +- SeriousSam3BFE/ss3sserver | 2 +- Starbound/sbserver | 2 +- SvenCoop/svencoopserver | 2 +- TeamFortress2/tf2server | 2 +- TeamFortressClassic/tfcserver | 2 +- TeamSpeak3/ts3server | 2 +- Teeworlds/twserver | 2 +- Terraria/terrariaserver | 2 +- UnrealTournament2004/ut2k4server | 2 +- UnrealTournament99/ut99server | 2 +- WolfensteinEnemyTerritory/wetserver | 2 +- 46 files changed, 47 insertions(+), 43 deletions(-) diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index 837ef62c8..e5e071271 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/berimbau" executabledir="${filesdir}" executable="./srcds_run.sh" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 78b57708e..8ff2d159c 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -84,9 +84,9 @@ systemdir="${filesdir}/brainbread2" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index 150a8d3ac..3473eed80 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/cure" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/CounterStrike/csserver b/CounterStrike/csserver index 601a3eb93..e2cdde7fc 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index 5d58f2314..895ec1583 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/czero" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 6fb3d9313..87425d00a 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -102,9 +102,9 @@ systemdir="${filesdir}/csgo" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index f2a7cd590..e6994789e 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -84,9 +84,9 @@ systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index ceedba772..f6cd2b34e 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/dod" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index 9e576bcd7..342ccc97a 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/dod" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index 2b7fdb4ec..7440b369f 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -81,9 +81,9 @@ systemdir="${filesdir}/doi" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index 6d6425929..b987c9685 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/dmc" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 92002f8fb..e96d304b8 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -77,6 +77,7 @@ systemdir="${filesdir}" executabledir="${filesdir}/bin" executable="./dontstarve_dedicated_server_nullrenderer" servercfg="settings.ini" +servercfgdefault="settings.ini" servercfgdir="${HOME}/.klei/DoNotStarveTogether" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/lgsm-default.ini" diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index e8db62c58..4b8b531e9 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/dab" executabledir="${filesdir}" executable="./dabds.sh" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index 5dfa54af1..20e28b2d4 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -84,9 +84,9 @@ systemdir="${filesdir}/empires" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/server.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 59a896a20..8a9fa69c5 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/fof" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 1eab6d643..edc225016 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -101,9 +101,9 @@ addonsdir="${systemdir}/addons" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 9b9495e0c..081362d2a 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/gesource" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index e26a2b11c..ff324c434 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/hl2mp" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 10a32f7d7..2716a27e9 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -73,9 +73,9 @@ systemdir="${filesdir}/valve" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index ff040ab27..0a45df162 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/hl1mp" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/Insurgency/insserver b/Insurgency/insserver index 29ed31c8c..ba49fb494 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -81,9 +81,9 @@ systemdir="${filesdir}/insurgency" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/JustCause2/jc2server b/JustCause2/jc2server index 7ac9b3b3a..a2c6a7515 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -73,6 +73,7 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./Jcmp-Server" servercfg="config.lua" +servercfgdefault="config.lua" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/default_config.lua" diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index a9ba85c33..09ad60899 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -78,9 +78,9 @@ systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" +servercfgdefault="Default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/Default.ini" compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index 9a2f8fb47..d05cd9a79 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/left4dead" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index 2dda75759..bddcaae9e 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -78,9 +78,9 @@ systemdir="${filesdir}/left4dead2" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/Minecraft/mcserver b/Minecraft/mcserver index 71c5e207f..6317fb9bc 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -59,6 +59,7 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="java -Xmx${javaram}M -jar minecraft_server.jar" servercfg="server.properties" +servercfgdefault="server.properties" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" servercfgdefault="${servercfgdir}/lgsm-default.ini" diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index ab9fdc22f..6bfa1e996 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -61,6 +61,7 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./murmur.x86" servercfg="murmur.ini" +servercfgdefault="murmur.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index d1fea24f0..be02bfc0e 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -84,9 +84,9 @@ systemdir="${filesdir}/nmrih" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index 7faa17c66..5013110e2 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/gearbox" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -defaultcfg="${servercfgdir}/server.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index def1a6c95..5074af33e 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -79,9 +79,9 @@ systemdir="${filesdir}/pvkii" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 8683d84e8..143c382c6 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -74,10 +74,10 @@ filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${filesdir}" executable="./start-server.sh" -servercfg="servertest.ini" +servercfg="server.ini" +servercfgdefault="server.cfg" servercfgdir="${HOME}/Zomboid/Server" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" # Logging diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 72fdc32d8..f1283d2a0 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -82,9 +82,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable=$([ "${arch}" == 'x64' ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh") servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${filesdir}/baseq3" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 0403a67a5..66b85d98e 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -69,9 +69,9 @@ systemdir="${filesdir}/system" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" +servercfgdefault="default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/default.ini" compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index d3a285691..ff5862808 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/ricochet" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/Rust/rustserver b/Rust/rustserver index 43a621596..6e5f8f76a 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -97,9 +97,9 @@ executabledir="${filesdir}" executable="./RustDedicated" serveridentitydir="${systemdir}/server/${servicename}" servercfg="server.cfg" +servercfgdefault="server.cfg" servercfgdir="${serveridentitydir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index 9d2420c60..35b78d831 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/Bin" executable="./runSam3_DedicatedServer.sh" executabledir="${systemdir}" servercfg="${servicename}.ini" +servercfgdefault="server.ini" servercfgdir="${filesdir}/Content/SeriousSam3/Config" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" # Logging diff --git a/Starbound/sbserver b/Starbound/sbserver index 9af94eae6..197d93ee3 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -73,9 +73,9 @@ systemdir="${filesdir}" executabledir="${filesdir}/linux" executable="./starbound_server" servercfg="starbound_server.config" +servercfgdefault="starbound_server.config" servercfgdir="${filesdir}/storage" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.config" backupdir="${rootdir}/backups" # Logging diff --git a/SvenCoop/svencoopserver b/SvenCoop/svencoopserver index 1ae1a341e..c89ffb88d 100644 --- a/SvenCoop/svencoopserver +++ b/SvenCoop/svencoopserver @@ -78,9 +78,9 @@ systemdir="${filesdir}/svencoop" executabledir="${filesdir}" executable="./svends_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index c9acadd43..972e60903 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -84,9 +84,9 @@ systemdir="${filesdir}/tf" executabledir="${filesdir}" executable="./srcds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/cfg" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index 7dc68f971..4a9496d35 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -74,9 +74,9 @@ systemdir="${filesdir}/tfc" executabledir="${filesdir}" executable="./hlds_run" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index 88f187663..2c0af6bd5 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -47,9 +47,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" +servercfgdefault="ts3server.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" # Logging diff --git a/Teeworlds/twserver b/Teeworlds/twserver index c8d920d59..8ab31bbcb 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -69,9 +69,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./teeworlds_srv" servercfg="${servicename}.cfg" # Teeworlds can also auto load any config if an autoexec.cfg file is present in the server dir +servercfgdefault="server.cfg" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 2cbef2d13..fba75083f 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -69,9 +69,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./TerrariaServer" servercfg="${servicename}.txt" +servercfgdefault="serverconfig.txt" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.txt" backupdir="${rootdir}/backups" # Logging diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index f28240414..3c82b7e7b 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -52,9 +52,9 @@ systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" +servercfgdefault="UT2004.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/UT2004.ini" compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index b40a41fdd..771882279 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -61,9 +61,9 @@ systemdir="${filesdir}/System" executabledir="${systemdir}" executable="./ucc-bin" servercfg="${servicename}.ini" +servercfgdefault="Default.ini" servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/Default.ini" compressedmapsdir="${rootdir}/Maps-Compressed" backupdir="${rootdir}/backups" diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index 28f4c510b..aab4a9687 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -59,9 +59,9 @@ systemdir="${filesdir}" executabledir="${systemdir}" executable="./etded" servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" servercfgdir="${systemdir}/etmain" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.cfg" backupdir="${rootdir}/backups" # Logging From e2517134a713e880f9274f9d0fd93f2c9f048689 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 20:08:08 +0100 Subject: [PATCH 18/51] updated tests --- tests/tests_jc2server.sh | 2 +- tests/tests_ts3server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index bc7516427..7a6b62b5d 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -67,9 +67,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./Jcmp-Server" servercfg="config.lua" +servercfgdefault="config.lua" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/default_config.lua" backupdir="${rootdir}/backups" # Logging diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 3189ec872..82a4cc147 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -60,9 +60,9 @@ systemdir="${filesdir}" executabledir="${filesdir}" executable="./ts3server_startscript.sh" servercfg="${servicename}.ini" +servercfgdefault="ts3server.ini" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/lgsm-default.ini" backupdir="${rootdir}/backups" # Logging From 8f1a17cb765ca68946df6dcae310f9026fca8139 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Oct 2016 20:08:20 +0100 Subject: [PATCH 19/51] bug --- JustCause2/jc2server | 1 - 1 file changed, 1 deletion(-) diff --git a/JustCause2/jc2server b/JustCause2/jc2server index a2c6a7515..fa10697cb 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -76,7 +76,6 @@ servercfg="config.lua" servercfgdefault="config.lua" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" -servercfgdefault="${servercfgdir}/default_config.lua" backupdir="${rootdir}/backups" # Logging From c543b1a7c35e98b9d653d953e0d0e6275087bdac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 12 Oct 2016 21:28:42 +0100 Subject: [PATCH 20/51] Updated Unreal tournament configs --- lgsm/functions/install_config.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 95bf65124..79bdb76ab 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -334,14 +334,20 @@ elif [ "${gamename}" == "Terraria" ]; then fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament" ]; then - : + gamedirname="UnrealTournament" + array_configs+=( Game.ini Engine.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - : + gamedirname="UnrealTournament2004" + array_configs+=( Default.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 3" ]; then : elif [ "${gamename}" == "Unreal Tournament 99" ]; then gamedirname="UnrealTournament99" - array_configs+=( Game.ini Engine.ini ) + array_configs+=( Default.ini ) fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Enemy Territory" ]; then From ea992716eed38ee47d03f5a77ed1263da41f4a60 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 16:40:06 +0100 Subject: [PATCH 21/51] corrected UT2004 config name --- lgsm/functions/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 79bdb76ab..9c88b9f77 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -340,7 +340,7 @@ elif [ "${gamename}" == "Unreal Tournament" ]; then fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 2004" ]; then gamedirname="UnrealTournament2004" - array_configs+=( Default.ini ) + array_configs+=( UT2004.ini ) fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 3" ]; then From 2a2b53526eef22098be5da7f1e6a2f2ea9b5c15f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 16:52:11 +0100 Subject: [PATCH 22/51] ut99 fix no longer required fixes now in the default config --- lgsm/functions/fix.sh | 6 ------ lgsm/functions/fix_ut99.sh | 30 ------------------------------ 2 files changed, 36 deletions(-) delete mode 100644 lgsm/functions/fix_ut99.sh diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 41e1ecc2f..5671ed627 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -68,12 +68,6 @@ if [ "${function_selfname}" == "command_install.sh" ]; then echo "=================================" sleep 1 fix_ut2k4.sh - elif [ "${gamename}" == "Unreal Tournament 99" ]; then - echo "" - echo "Applying ${gamename} Server Fixes" - echo "=================================" - sleep 1 - fix_ut99.sh elif [ "${gamename}" == "Unreal Tournament" ]; then echo "" echo "Applying ${gamename} Server Fixes" diff --git a/lgsm/functions/fix_ut99.sh b/lgsm/functions/fix_ut99.sh deleted file mode 100644 index aaa16bbf0..000000000 --- a/lgsm/functions/fix_ut99.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# LGSM fix_ut99.sh function -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -# Description: Resolves various issues with Unreal Tournament 99. - -local commandname="FIX" -local commandaction="Fix" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" - -echo "${servercfgfullpath}" -echo "enabling UdpServerUplink." -{ -echo "[IpServer.UdpServerUplink]" -echo "DoUplink=True" -echo "UpdateMinutes=1" -echo "MasterServerAddress=unreal.epicgames.com" -echo "MasterServerPort=27900" -echo "Region=0" -}| tee -a "${servercfgfullpath}" > /dev/null 2>&1 -sleep 1 -echo "removing dead gamespy.com master server." -sed -i '/master0.gamespy.com/d' "${servercfgfullpath}" -sleep 1 -echo "removing dead mplayer.com master server." -sed -i '/master.mplayer.com/d' "${servercfgfullpath}" -sleep 1 -echo "inserting qtracker.com master server." -sed -i '65i\ServerActors=IpServer.UdpServerUplink MasterServerAddress=master.qtracker.com MasterServerPort=27900' "${servercfgfullpath}" -echo "" \ No newline at end of file From 40ee00c0ba58e4bdb9ac5632e28aec39fb31cd52 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 16:58:05 +0100 Subject: [PATCH 23/51] corrected W:ET file --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 58611b10e..b90719f80 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -18,7 +18,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Battlefield: 1942" ]; then fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Enemy Territory" ]; then - fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="ded32053e470fe15d9403ec4a0ab7e89" + fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" elif [ "${gamename}" == "Unreal Tournament" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" elif [ "${gamename}" == "GoldenEye: Source" ]; then From f13a24c5fb29c67fe9a28aab3890f26b040fb781 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 17:41:53 +0100 Subject: [PATCH 24/51] added ipchecking to idtech3 engine --- lgsm/functions/info_config.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index d7a4ddc77..1c27e7c92 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -164,7 +164,6 @@ fn_info_config_idtech3(){ rconpassword="${unavailable}" servername="${unavailable}" serverpassword="${unavailable}" - slots="${zero}" else rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | xargs -0) @@ -177,6 +176,10 @@ fn_info_config_idtech3(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} slots=${slots:-"0"} + ipconfigcheck=$(grep "net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/net_ip//g' | tr -d '=\";,:' | xargs -0) + if [ -n "${ipconfigcheck}" ]; then + ip="${ipconfigcheck}" + fi fi } From 691bab99955f22aba59c7c1fbd7be1d02753cf74 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 19:55:23 +0100 Subject: [PATCH 25/51] improvements for wetserver --- lgsm/functions/command_details.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index cd01e9adb..b7a25b2d7 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -384,7 +384,7 @@ fn_details_refractor(){ } | column -s $'\t' -t } -fn_details_idtech3(){ +fn_details_quakelive(){ echo -e "netstat -atunp | grep qzeroded" echo -e "" if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then @@ -399,6 +399,19 @@ fn_details_idtech3(){ } | column -s $'\t' -t } +fn_details_wolfensteinenemyterritory(){ + echo -e "netstat -atunp | grep etded" + echo -e "" + if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then + echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}." + echo -e "" + fi + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_details_seriousengine35(){ echo -e "netstat -atunp | grep Sam3_Dedicate" @@ -621,8 +634,6 @@ fn_display_details() { fn_details_minecraft elif [ "${engine}" == "projectzomboid" ]; then fn_details_projectzomboid - elif [ "${engine}" == "idtech3" ]; then - fn_details_idtech3 elif [ "${engine}" == "realvirtuality" ]; then fn_details_realvirtuality elif [ "${engine}" == "seriousengine35" ]; then @@ -639,18 +650,22 @@ fn_display_details() { fn_details_terraria elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_details_unreal + elif [ "${gamename}" == "7 Days To Die" ]; then + fn_details_sdtd elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_details_ark elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld - elif [ "${gamename}" == "7 Days To Die" ]; then - fn_details_sdtd + elif [ "${gamename}" == "Quake Live" ]; then + fn_details_quakelive elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 elif [ "${gamename}" == "Mumble" ]; then fn_details_mumble elif [ "${gamename}" == "Rust" ]; then fn_details_rust + elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then + fn_details_wolfensteinenemyterritory else fn_print_error_nl "Unable to detect server engine." fi From 49942bd27ea1facf093ac2a976b5a99295ef9376 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 19:55:31 +0100 Subject: [PATCH 26/51] Renamed gamename --- WolfensteinEnemyTerritory/wetserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index aab4a9687..23789b26e 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -43,7 +43,7 @@ githubbranch="master" # Server Details servicename="et-server" -gamename="Enemy Territory" +gamename="Wolfenstein: Enemy Territory" engine="idtech3" # Directories From 37c0423917673fcc358418e26aca338048f511ca Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 20:41:54 +0100 Subject: [PATCH 27/51] Updated ET name --- lgsm/functions/command_install.sh | 2 +- lgsm/functions/install_config.sh | 2 +- lgsm/functions/install_config.sh.old.sh | 2 +- lgsm/functions/install_server_files.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index bcfe36fd2..5b741a126 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -18,7 +18,7 @@ check_deps.sh if [ "${gamename}" == "Unreal Tournament 2004" ]; then install_server_files.sh install_ut2k4_key.sh -elif [ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Enemy Territory" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Mumble" ]; then +elif [ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Mumble" ]; then installer=1 install_server_files.sh elif [ -n "${appid}" ]; then diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 9c88b9f77..ad7278e93 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -350,7 +350,7 @@ elif [ "${gamename}" == "Unreal Tournament 99" ]; then array_configs+=( Default.ini ) fn_fetch_default_config fn_default_config_remote -elif [ "${gamename}" == "Enemy Territory" ]; then +elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then gamedirname="WolfensteinEnemyTerritory" array_configs+=( server.cfg ) fn_fetch_default_config diff --git a/lgsm/functions/install_config.sh.old.sh b/lgsm/functions/install_config.sh.old.sh index 7ac97a6fe..5e4b2b999 100644 --- a/lgsm/functions/install_config.sh.old.sh +++ b/lgsm/functions/install_config.sh.old.sh @@ -312,7 +312,7 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then fn_sourceconfig elif [ "${gamename}" == "Empires Mod" ]; then fn_defaultconfig -elif [ "${gamename}" == "Enemy Territory" ]; then +elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then echo -e "downloading lgsm-default.cfg...\c" wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq sleep 1 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index b90719f80..3bd782e38 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -17,7 +17,7 @@ fn_install_server_files(){ fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c" elif [ "${gamename}" == "Battlefield: 1942" ]; then fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" - elif [ "${gamename}" == "Enemy Territory" ]; then + elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fileurl="http://files.gameservermanagers.com/WolfensteinEnemyTerritory/enemy-territory.260b.tar.bz2"; filedir="${tmpdir}"; filename="enemy-territory.260b.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="f833f514bfcdd46b42c111f83350c5a7" elif [ "${gamename}" == "Unreal Tournament" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" From 53c14f86afdf0f95037087d4a6970e62b16ed280 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 20:52:27 +0100 Subject: [PATCH 28/51] split quake live and et --- lgsm/functions/info_config.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 1c27e7c92..923f48b36 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -159,7 +159,7 @@ fn_info_config_projectzomboid(){ fi } -fn_info_config_idtech3(){ +fn_info_config_quakelive(){ if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" servername="${unavailable}" @@ -176,7 +176,31 @@ fn_info_config_idtech3(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} slots=${slots:-"0"} - ipconfigcheck=$(grep "net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/net_ip//g' | tr -d '=\";,:' | xargs -0) + ipconfigcheck=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | xargs -0) + if [ -n "${ipconfigcheck}" ]; then + ip="${ipconfigcheck}" + fi + fi +} + +fn_info_config_wolfensteinenemyterritory(){ + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + slots="${zero}" + else + rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0) + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | xargs -0) + serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | xargs -0) + slots=$(grep "sv_maxclients" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + slots=${slots:-"0"} + ipconfigcheck=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | xargs -0) if [ -n "${ipconfigcheck}" ]; then ip="${ipconfigcheck}" fi @@ -458,8 +482,8 @@ elif [ "${gamename}" == "Battlefield: 1942" ]; then elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve # Quake Live -elif [ "${engine}" == "idtech3" ]; then - fn_info_config_idtech3 +elif [ "${gamename}" == "Quake Live" ]; then + fn_info_config_quakelive # Minecraft elif [ "${engine}" == "lwjgl2" ]; then fn_info_config_minecraft @@ -495,4 +519,6 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then # 7 Day To Die (unity3d) elif [ "${gamename}" == "7 Days To Die" ]; then fn_info_config_sdtd +elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then + fn_info_config_wolfensteinenemyterritory fi From 44f3a7018c1889cee6b36e95e0aa795c55756187 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 20:57:14 +0100 Subject: [PATCH 29/51] ET now bypasses IP check --- lgsm/functions/check_ip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 1a64db6bd..99cf07503 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -8,7 +8,7 @@ local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then +if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ] && [ "${gamename}" != "Wolfenstein: Enemy Territory" ]; then if [ ! -f "/bin/ip" ]; then ipcommand="/sbin/ip" else From 947e6114d7a17d0c0ae7a9fa6a6f3226b3987610 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:06:38 +0100 Subject: [PATCH 30/51] Revert "ET now bypasses IP check" This reverts commit 44f3a7018c1889cee6b36e95e0aa795c55756187. --- lgsm/functions/check_ip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index 99cf07503..1a64db6bd 100644 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -8,7 +8,7 @@ local commandname="CHECK" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ] && [ "${gamename}" != "Wolfenstein: Enemy Territory" ]; then +if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then if [ ! -f "/bin/ip" ]; then ipcommand="/sbin/ip" else From 054ec4747dcaf3301c9a83d5295e60e24d15f548 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:12:49 +0100 Subject: [PATCH 31/51] added ip= --- WolfensteinEnemyTerritory/wetserver | 1 + 1 file changed, 1 insertion(+) diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index 23789b26e..bfe6d5aaa 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -27,6 +27,7 @@ pushbulletalert="off" pushbullettoken="accesstoken" # Start Variables +ip="0.0.0.0" fn_parms(){ parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfgfullpath}" From e79e40ecf99a1a94676b4b7b9b033cd9e34ef696 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:12:59 +0100 Subject: [PATCH 32/51] added port for ET --- lgsm/functions/info_config.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 923f48b36..292476789 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -189,11 +189,14 @@ fn_info_config_wolfensteinenemyterritory(){ servername="${unavailable}" serverpassword="${unavailable}" slots="${zero}" + port="27960" else + port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0) servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | xargs -0) serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | xargs -0) - slots=$(grep "sv_maxclients" "${servercfgfullpath}" | tr -cd '[:digit:]') + slots=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + # Not Set rconpassword=${rconpassword:-"NOT SET"} From ce4934da06fbd31b9395770de5bb46db6fdc4ce0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:14:59 +0100 Subject: [PATCH 33/51] fixed port for et --- lgsm/functions/info_config.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 292476789..6647287b5 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -189,7 +189,7 @@ fn_info_config_wolfensteinenemyterritory(){ servername="${unavailable}" serverpassword="${unavailable}" slots="${zero}" - port="27960" + port="${zero}" else port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0) @@ -203,6 +203,7 @@ fn_info_config_wolfensteinenemyterritory(){ servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} slots=${slots:-"0"} + port=${port:-"27960"} ipconfigcheck=$(grep "set net_ip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set net_ip//g' | tr -d '=\";,:' | xargs -0) if [ -n "${ipconfigcheck}" ]; then ip="${ipconfigcheck}" From 5e4543347491a843f66edb4eebae79aabb94ee2a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:18:11 +0100 Subject: [PATCH 34/51] changed to quake live --- lgsm/functions/info_parms.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 007b44fa8..7be827c7b 100644 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -15,7 +15,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" unavailable="${red}UNAVAILABLE${default}" zero="${red}0${default}" -fn_info_config_idtech3(){ +fn_info_config_quakelive(){ # Not Set port=${port:-"NOT SET"} rconport=${rconport:-"0"} @@ -128,8 +128,8 @@ elif [ "${engine}" == "dontstarve" ]; then elif [ "${engine}" == "projectzomboid" ]; then fn_info_config_projectzomboid # Quake Live -elif [ "${engine}" == "idtech3" ]; then - fn_info_config_idtech3 +elif [ "${gamename}" == "Quake Live" ]; then + fn_info_config_quakelive # ARMA 3 elif [ "${engine}" == "realvirtuality" ]; then fn_info_config_realvirtuality From 541f502da5dc7531fb54694f09c1cf60cb9b4be6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:29:20 +0100 Subject: [PATCH 35/51] remove warning for now --- lgsm/functions/command_details.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index b7a25b2d7..60f244407 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -402,10 +402,6 @@ fn_details_quakelive(){ fn_details_wolfensteinenemyterritory(){ echo -e "netstat -atunp | grep etded" echo -e "" - if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then - echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}." - echo -e "" - fi { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" From 66c9b22d1747ab90fd29a81b17fe4275700ac073 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:35:12 +0100 Subject: [PATCH 36/51] updated glibc info for ET --- lgsm/functions/info_glibc.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 207d96ed3..8da6c185b 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -101,12 +101,13 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${gamename}" == "Mumble" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" -elif [ "${engine}" == "idtech3" ]; then - glibcrequired="2.0" - glibcfix="no" + elif [ "${engine}" == "refractor" ]; then glibcrequired="2.0" glibcfix="no" +elif [ "${engine}" == "Wolfenstein: Enemy Territory" ]; then + glibcrequired="2.2.4" + glibcfix="no" else glibcrequired="UNKNOWN" glibcfix="no" From e954510bab940c241b8a4964754f2b537e4022ce Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:37:18 +0100 Subject: [PATCH 37/51] gamename --- lgsm/functions/info_glibc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 8da6c185b..655402584 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -105,7 +105,7 @@ elif [ "${gamename}" == "Mumble" ]; then elif [ "${engine}" == "refractor" ]; then glibcrequired="2.0" glibcfix="no" -elif [ "${engine}" == "Wolfenstein: Enemy Territory" ]; then +elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then glibcrequired="2.2.4" glibcfix="no" else From 7ae68ce4e29e2020c5c660a1da438ff816512b14 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 21:56:42 +0100 Subject: [PATCH 38/51] Updated ET info --- lgsm/functions/info_config.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 6647287b5..8d2228c10 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -191,11 +191,11 @@ fn_info_config_wolfensteinenemyterritory(){ slots="${zero}" port="${zero}" else - port=$(grep "net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') - rconpassword=$(grep "zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0) - servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | xargs -0) - serverpassword=$(grep "g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password//g' | tr -d '=\";,:' | xargs -0) - slots=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "set net_port" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + rconpassword=$(grep "set zmq_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set zmq_rcon_password //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//g' -e '/^\//d' | xargs -0) + servername=$(grep "set sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs -0) + serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set g_password //g' | tr -d '=\";,:' | xargs -0) + slots=$(grep "set sv_maxclients" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set @@ -221,7 +221,7 @@ fn_info_config_realvirtuality(){ servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | xargs -0) adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/passwordAdmin//g' | tr -d '=\";,:' | xargs -0) serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/password//g' | tr -d '=\";,:' | xargs -0) - slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} @@ -242,8 +242,8 @@ fn_info_config_seriousengine35(){ servername=$(grep "prj_strMultiplayerSessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/prj_strMultiplayerSessionName//g' | tr -d '=\";,:' | xargs -0) rconpassword=$(grep "rcts_strAdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/rcts_strAdminPassword//g' | tr -d '=\";,:' | xargs -0) gamemode=$(grep "gam_idGameMode" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/gam_idGameMode//g' | tr -d '=\";,:' | xargs -0) - slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - port=$(grep "prj_uwPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + slots=$(grep "gam_ctMaxPlayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') + port=$(grep "prj_uwPort" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} @@ -376,8 +376,8 @@ fn_info_config_terraria(){ else servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | xargs -0) port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]') - gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "#" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | xargs -0) - slots=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | xargs -0) + slots=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]') # Not Set servername=${servername:-"NOT SET"} From 374e0461d76154124c97e8c36cc30f7f6bbca71b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:16:49 +0100 Subject: [PATCH 39/51] added W:ET --- lgsm/functions/core_getopt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index d56e87c88..e23ad3111 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -80,7 +80,7 @@ case "${getopt}" in esac } -fn_getopt_bf1942(){ +fn_getopt_generic_no_update(){ case "${getopt}" in st|start) command_start.sh;; @@ -619,8 +619,8 @@ case "${getopt}" in if [ "${gamename}" == "Mumble" ]; then fn_getopt_mumble -elif [ "${gamename}" == "Battlefield: 1942" ]; then - fn_getopt_bf1942 +elif [ "${gamename}" == "Battlefield: 1942" ]|| [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then + fn_getopt_generic_no_update elif [ "${engine}" == "lwjgl2" ]; then fn_getopt_minecraft elif [ "${gamename}" == "TeamSpeak 3" ]; then From 9d81a3308b67b11d4999980c85928c15596be55b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:16:59 +0100 Subject: [PATCH 40/51] corrected servercfg exec --- WolfensteinEnemyTerritory/wetserver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index bfe6d5aaa..90fc44913 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -30,7 +30,7 @@ pushbullettoken="accesstoken" ip="0.0.0.0" fn_parms(){ - parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfgfullpath}" + parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" } #### Advanced Variables #### From abd0bc7aae0af7a4a1c8cfe1d9ff0943417a5976 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:28:56 +0100 Subject: [PATCH 41/51] corrected idtech3 and quake live --- lgsm/functions/gsquery.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index fcac90438..e2e930e94 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -17,27 +17,30 @@ class GameServer: self.server_response_timeout = 5 self.default_buffer_length = 1024 # - if self.option.engine == 'source': - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + if self.option.engine == 'avalanche': + self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' + elif self.option.engine == 'goldsource': self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' - elif self.option.engine == 'spark': - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + elif self.option.engine == 'idtech3': + self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' + elif self.option.engine == 'quakelive': + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'realvirtuality': - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'refractor': + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + elif self.option.engine == 'source': + self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' + elif self.option.engine == 'spark': self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unity3d': self.query_prompt_string = '\xFF\xFF\xFF\xFFTSource Engine Query\0' - elif self.option.engine == 'idtech3': - self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0' elif self.option.engine == 'unreal': self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C' elif self.option.engine == 'unreal2': self.query_prompt_string = b'\x79\x00\x00\x00\x00' - elif self.option.engine == 'avalanche': - self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40' - self.connected = False + self.connected = False self.response = None self.sanity_checks() @@ -105,7 +108,7 @@ if __name__ == '__main__': action = 'store', dest = 'engine', default = False, - help = 'Engine type: avalanche, goldsource, idtech3, realvirtuality, refractor, spark, source, unity3d, unreal, unreal2.' + help = 'Engine type: avalanche, goldsource, idtech3, realvirtuality, quakelive, refractor, spark, source, unity3d, unreal, unreal2.' ) parser.add_option( '-v', '--verbose', From fda09fb22e22466362d2c35ae0a79d9aa518802a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:34:09 +0100 Subject: [PATCH 42/51] changed Quake Live engine to idtech3_ql Quake live uses modified version of idtech3 that has config and query differences. --- QuakeLive/qlserver | 2 +- lgsm/functions/command_details.sh | 2 +- lgsm/functions/monitor_gsquery.sh | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index f1283d2a0..accf6aadf 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -67,7 +67,7 @@ branch="" # Server Details servicename="ql-server" gamename="Quake Live" -engine="idtech3" +engine="idtech3_ql" # Directories rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 60f244407..539b57c48 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -290,7 +290,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then diff --git a/lgsm/functions/monitor_gsquery.sh b/lgsm/functions/monitor_gsquery.sh index 02ce17ab4..2c8b2902b 100644 --- a/lgsm/functions/monitor_gsquery.sh +++ b/lgsm/functions/monitor_gsquery.sh @@ -29,6 +29,8 @@ if [ "${gsquery}" == "yes" ]; then port=$((port + 1)) elif [ "${engine}" == "spark" ]; then port=$((port + 1)) + elif [ "${engine}" == "idtech3_ql" ]; then + engine="quakelive" fi if [ -n "${queryport}" ]; then From ac0d4392aa674e6a8493e62f0cd2b3e9739e4e79 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:35:48 +0100 Subject: [PATCH 43/51] forces Quake live engine to idtech3_ql --- lgsm/functions/core_functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 388846276..987ffcde9 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -12,6 +12,8 @@ elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then gamename="Counter-Strike: Global Offensive" elif [ "${gamename}" == "Counter Strike: Source" ]; then gamename="Counter-Strike: Source" +elif [ "${gamename}" == "Quake Live" ]; then + engine="idtech3_ql" fi if [ "${emailnotification}" == "on" ]; then From 5abee168b35a8faf2f69c83d2cf946c2e6f4f7bd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 14 Oct 2016 22:37:47 +0100 Subject: [PATCH 44/51] added W:ET and Quake Live to gsquery --- lgsm/functions/command_monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 4052a17db..33b86e55d 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -79,7 +79,7 @@ fn_monitor_tmux(){ fn_print_ok_eol_nl fn_script_log_pass "Checking session: OK" # runs gsquery check on game with specific engines. - local allowed_engines_array=( avalanche goldsource refractor realvirtuality source spark unity3d unreal unreal2 ) + local allowed_engines_array=( avalanche goldsource idtech3 idtech3_ql refractor realvirtuality source spark unity3d unreal unreal2 ) for allowed_engine in "${allowed_engines_array[@]}" do if [ "${allowed_engine}" == "${engine}" ]; then From 9b0fb1fea190000dcd4dfdb694f599d539735ff9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 11:19:12 +0100 Subject: [PATCH 45/51] updated md5sum for UT3 --- lgsm/functions/install_server_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 3bd782e38..e2778ae64 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -14,7 +14,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut2004-server-3339-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" elif [ "${gamename}" == "Unreal Tournament 3" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c" + fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Battlefield: 1942" ]; then fileurl="http://files.gameservermanagers.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; filedir="${tmpdir}"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then From 8f282ace406318fd40b4d0434e03b4e44e163fd7 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Sat, 15 Oct 2016 13:23:31 +0200 Subject: [PATCH 46/51] Corrected spelling of "Teeworlds" --- lgsm/functions/install_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index ad7278e93..3f8574c44 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -324,7 +324,7 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Teeworlds" ]; then - gamedirname="TeeWorlds" + gamedirname="Teeworlds" array_configs+=( server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg ) fn_fetch_default_config fn_default_config_remote From e4ac3eadcc4ae2303eb104300ed90d044c89bf2f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 12:38:07 +0100 Subject: [PATCH 47/51] Config update --- UnrealTournament3/ut3server | 19 +- lgsm/functions/install_config.sh.old.sh | 465 ------------------------ 2 files changed, 10 insertions(+), 474 deletions(-) delete mode 100644 lgsm/functions/install_config.sh.old.sh diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index 6af1c802e..b9e8f4f16 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -46,6 +46,14 @@ fn_parms(){ parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?MaxPlayers=${maxplayers}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" } +#### Advanced Variables #### + +# Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" # Server Details servicename="ut3-server" gamename="Unreal Tournament 3" @@ -63,7 +71,8 @@ filesdir="${rootdir}/serverfiles" systemdir="${filesdir}" executabledir="${systemdir}/Binaries" executable="./ut3" -servercfg="UTGame.ini" +servercfg="${servicename}.ini" +servercfgdefault="UTGame.ini" servercfgdir="${systemdir}/UTGame/Config" servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" @@ -84,13 +93,6 @@ gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" -# Github Branch Select -# Allows for the use of different function files -# from a different repo and/or branch. -githubuser="GameServerManagers" -githubrepo="LinuxGSM" -githubbranch="master" - ##### Script ##### # Do not edit @@ -154,4 +156,3 @@ core_functions.sh getopt=$1 core_getopt.sh - diff --git a/lgsm/functions/install_config.sh.old.sh b/lgsm/functions/install_config.sh.old.sh deleted file mode 100644 index 5e4b2b999..000000000 --- a/lgsm/functions/install_config.sh.old.sh +++ /dev/null @@ -1,465 +0,0 @@ -#!/bin/bash -# LGSM install_config.sh function -# Author: Daniel Gibbs -# Website: https://gameservermanagers.com -# Description: Creates default server configs. - -local commandname="INSTALL" -local commandaction="Install" -local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" - -fn_defaultconfig(){ - echo "creating ${servercfg} config file." - fn_script_log_info "creating ${servercfg} config file." - cp -v "${servercfgdefault}" "${servercfgfullpath}" - sleep 1 -} - -fn_userinputconfig(){ - # allow user to input server name and password - if [ -z "${autoinstall}" ]; then - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - read -p "Enter server name: " servername - read -p "Enter rcon password: " rconpass - else - servername="${servicename}" - rconpass="rconpassword" - fi - echo "changing hostname." - fn_script_log_info "changing hostname." - sed -i "s/\"\"/\"${servername}\"/g" "${servercfgfullpath}" - sleep 1 - echo "changing rconpassword." - fn_script_log_info "changing rconpassword." - sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgfullpath}" - sleep 1 -} - -fn_arma3config(){ - fn_defaultconfig - echo "creating ${networkcfg} config file." - fn_script_log_info "creating ${networkcfg} config file." - cp -v "${networkcfgdefault}" "${networkcfgfullpath}" - sleep 1 - echo "" -} - -fn_goldsourceconfig(){ - fn_defaultconfig - - # server.cfg redirects to ${servercfg} for added security - echo "creating server.cfg." - fn_script_log_info "creating server.cfg." - touch "server.cfg" - sleep 1 - echo "creating redirect." - fn_script_log_info "creating redirect." - echo "server.cfg > ${servercfg}." - echo "exec ${servercfg}" > "server.cfg" - sleep 1 - - # creating other files required - echo "creating listip.cfg." - fn_script_log_info "creating listip.cfg." - touch "${systemdir}/listip.cfg" - sleep 1 - echo "creating banned.cfg." - fn_script_log_info "creating banned.cfg." - touch "${systemdir}/banned.cfg" - sleep 1 - - fn_userinputconfig - echo "" -} - -fn_serious3config(){ - fn_defaultconfig - echo "" - echo "To edit ${gamename} server config use SS3 Server GUI 3 tool" - echo "http://mrag.nl/sgui3/" - fn_script_log_info "To edit ${gamename} server config use SS3 Server GUI 3 tool" - fn_script_log_info "http://mrag.nl/sgui3/" - sleep 1 - echo "" -} - -fn_sourceconfig(){ - fn_defaultconfig - # server.cfg redirects to ${servercfg} for added security - echo "creating server.cfg." - fn_script_log_info "creating server.cfg." - touch "server.cfg" - sleep 1 - echo "creating redirect." - fn_script_log_info "creating redirect." - echo "server.cfg > ${servercfg}." - echo "exec ${servercfg}" > "server.cfg" - sleep 1 - fn_userinputconfig - echo "" -} - -fn_teeworldsconfig(){ - fn_defaultconfig - - echo "adding logfile location to config." - fn_script_log_info "adding logfile location to config." - sed -i "s@\"\"@\"${gamelog}\"@g" "${servercfgfullpath}" - sleep 1 - echo "removing password holder." - fn_script_log_info "removing password holder." - sed -i "s///" "${servercfgfullpath}" - sleep 1 - - fn_userinputconfig - echo "" -} - -fn_ut99config(){ - echo "creating ${servercfg} config file." - fn_script_log_info "creating ${servercfg} config file." - echo "${servercfgdefault} > ${servercfgfullpath}" - tr -d '\r' < "${servercfgdefault}" > "${servercfgfullpath}" - sleep 1 - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" - sleep 1 - echo "setting WebAdmin port to 8076." - fn_script_log_info "setting WebAdmin port to 8076." - sed -i '467i\ListenPort=8076' "${servercfgfullpath}" - sleep 1 - echo "" -} - -fn_unreal2config(){ - fn_defaultconfig - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "setting WebAdmin username and password." - fn_script_log_info "setting WebAdmin username and password." - sed -i 's/AdminName=/AdminName=admin/g' "${servercfgfullpath}" - sed -i 's/AdminPassword=/AdminPassword=admin/g' "${servercfgfullpath}" - sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=False/bEnabled=True/g' "${servercfgfullpath}" - if [ "${gamename}" == "Unreal Tournament 2004" ]; then - sleep 1 - echo "setting WebAdmin port to 8075." - fn_script_log_info "setting WebAdmin port to 8075." - sed -i 's/ListenPort=80/ListenPort=8075/g' "${servercfgfullpath}" - fi - sleep 1 - echo "" -} - -fn_ut3config(){ - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - echo "setting ServerName to 'LinuxGSM UT3 Server'." - fn_script_log_info "setting ServerName to 'LinuxGSM UT3 Server'." - sleep 1 - sed -i 's/ServerName=/ServerName=LinuxGSM UT3 Server/g' "${servercfgdir}/DefaultGame.ini" - echo "setting WebAdmin password to admin." - fn_script_log_info "setting WebAdmin password to admin." - echo '[Engine.AccessControl]' >> "${servercfgdir}/DefaultGame.ini" - echo 'AdminPassword=admin' >> "${servercfgdir}/DefaultGame.ini" - sleep 1 - echo "enabling WebAdmin." - fn_script_log_info "enabling WebAdmin." - sed -i 's/bEnabled=false/bEnabled=True/g' "${servercfgdir}/DefaultWeb.ini" - if [ "${gamename}" == "Unreal Tournament 3" ]; then - sleep 1 - echo "setting WebAdmin port to 8081." - fn_script_log_info "setting WebAdmin port to 8081." - sed -i 's/ListenPort=80/ListenPort=8081/g' "${servercfgdir}/DefaultWeb.ini" - fi - sleep 1 - echo "" -} - -fn_unrealtournament(){ - # allow user to input server name and password - if [ -z "${autoinstall}" ]; then - echo "" - echo "Configuring ${gamename} Server" - echo "=================================" - sleep 1 - read -p "Enter server name: " servername - read -p "Enter rcon password: " rconpass - else - servername="${servicename}" - rconpass="rconpassword" - fi - echo "changing hostname." - fn_script_log_info "changing hostname." - sed -i "s/\"\"/\"${servername}\"/g" "${servercfgdir}/Game.ini" - sleep 1 - echo "changing rconpassword." - fn_script_log_info "changing rconpassword." - sed -i "s/\"\"/\"${rconpass}\"/g" "${servercfgdir}/Engine.ini" - sleep 1 - -} - -echo "" -if [ "${gamename}" != "Hurtworld" ]; then -echo "Creating Configs" -echo "=================================" -sleep 1 - mkdir -pv "${servercfgdir}" - cd "${servercfgdir}" - githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}" -fi - - - elif [ "${gamename}" == "GoldenEye: Source" ]; then - fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${tmpdir}"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" - fi - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" - -if [ "${gamename}" == "7 Days To Die" ]; then - fn_defaultconfig -elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then - wget -N /dev/null ${githuburl}/ARKSurvivalEvolved/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - echo -e "downloading lgsm-default.ini...\c" - fn_defaultconfig -elif [ "${gamename}" == "ARMA 3" ]; then - echo -e "downloading lgsm-default.server.cfg...\c" - wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - echo -e "downloading lgsm-default.network.cfg...\c" - wget -N /dev/null ${githuburl}/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_arma3config -elif [ "${gamename}" == "BrainBread 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BrainBread2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BlackMesa/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Blade Symphony" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig -elif [ "${gamename}" == "Codename CURE" ]; then - echo -e "downloading lgsm-default.cfg...\c" - 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 - 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 - 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 - 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 - 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 - fn_sourceconfig -elif [ "${gamename}" == "Day of Defeat" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig -elif [ "${gamename}" == "Day of Defeat: Source" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Day of Infamy" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DayOfInfamy/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Don't Starve Together" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/DontStarveTogether/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Double Action: Boogaloo" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Empires Mod" ]; then - fn_defaultconfig -elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig - echo "" -elif [ "${gamename}" == "Fistful of Frags" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Garry's Mod" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "GoldenEye: Source" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/GoldenEyeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Half Life: Deathmatch" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/HalfLifeDeathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig -elif [ "${gamename}" == "Insurgency" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Just Cause 2" ]; then - fn_defaultconfig -elif [ "${gamename}" == "Killing Floor" ]; then - fn_unreal2config -elif [ "${gamename}" == "Left 4 Dead" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Left 4 Dead 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Minecraft" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/Minecraft/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "No More Room in Hell" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Natural Selection 2" ]; then - echo -e "no configs required." - sleep 1 - echo "" -elif [ "${gamename}" == "Pirates, Vikings, and Knights II" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/PiratesVikingandKnightsII/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Project Zomboid" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/ProjectZomboid/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Quake Live" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/QuakeLive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig -elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then - fn_unreal2config -elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_serious3config -elif [ "${gamename}" == "Rust" ]; then - echo -e "downloading server.cfg...\c" - wget -N /dev/null ${githuburl}/Rust/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Sven Co-op" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/SvenCoop/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig -elif [ "${gamename}" == "Starbound" ]; then - echo -e "downloading lgsm-default.config...\c" - wget -N /dev/null ${githuburl}/Starbound/cfg/lgsm-default.config 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig - fn_userinputconfig -elif [ "${gamename}" == "TeamSpeak 3" ]; then - echo -e "downloading lgsm-default.ini...\c" - wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Team Fortress 2" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_sourceconfig -elif [ "${gamename}" == "Team Fortress Classic" ]; then - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_goldsourceconfig -elif [ "${gamename}" == "Teeworlds" ]; then - echo -e "downloading ctf.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/ctf.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading dm.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/dm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading duel.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/duel.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading tdm.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/tdm.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading lgsm-default.cfg...\c" - wget -N /dev/null ${githuburl}/Teeworlds/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_teeworldsconfig -elif [ "${gamename}" == "Terraria" ]; then - echo -e "downloading lgsm-default.txt...\c" - wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_defaultconfig -elif [ "${gamename}" == "Unreal Tournament" ]; then - echo -e "downloading Engine.ini...\c" - wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Engine.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - echo -e "downloading Game.ini...\c" - wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Game.ini 2>&1 | grep -F HTTP | cut -c45- | uniq - sleep 1 - fn_unrealtournament -elif [ "${gamename}" == "Unreal Tournament 3" ]; then - fn_ut3config -elif [ "${gamename}" == "Unreal Tournament 2004" ]; then - fn_unreal2config -elif [ "${gamename}" == "Unreal Tournament 99" ]; then - fn_ut99config -fi From edfb35d64311ba1e4860afeb7b59b440fd63b7a3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 12:43:24 +0100 Subject: [PATCH 48/51] added UT3 --- lgsm/functions/install_config.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 3f8574c44..66b38c191 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -344,7 +344,10 @@ elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fn_fetch_default_config fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 3" ]; then - : + gamedirname="UnrealTournament3" + array_configs+=( UTGame.ini ) + fn_fetch_default_config + fn_default_config_remote elif [ "${gamename}" == "Unreal Tournament 99" ]; then gamedirname="UnrealTournament99" array_configs+=( Default.ini ) From 277c6c988e6429e29c7b19d9ae659866c2b2051a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 12:43:36 +0100 Subject: [PATCH 49/51] space --- UnrealTournament3/ut3server | 1 + 1 file changed, 1 insertion(+) diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index b9e8f4f16..780da1fb8 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -54,6 +54,7 @@ parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch githubuser="GameServerManagers" githubrepo="LinuxGSM" githubbranch="master" + # Server Details servicename="ut3-server" gamename="Unreal Tournament 3" From 156a6d8e6099139e1a37c9e8ad2e91c1a8873b14 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 13:17:43 +0100 Subject: [PATCH 50/51] added ut3 --- lgsm/functions/command_details.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 539b57c48..2ae4632f0 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -290,7 +290,7 @@ fn_details_ports(){ parmslocation="${red}UNKNOWN${default}" # engines that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) + local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "idtech3_ql" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -379,7 +379,7 @@ fn_details_refractor(){ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } @@ -404,7 +404,7 @@ fn_details_wolfensteinenemyterritory(){ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -587,6 +587,15 @@ fn_details_unreal(){ } | column -s $'\t' -t } +fn_details_ut3(){ + echo -e "netstat -atunp | grep ut3-bin" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" + } | column -s $'\t' -t +} + fn_details_ark(){ echo -e "netstat -atunp | grep ShooterGame" echo -e "" @@ -646,6 +655,8 @@ fn_display_details() { fn_details_terraria elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fn_details_unreal + elif [ "${engine}" == "unreal3" ]; then + fn_details_ut3 elif [ "${gamename}" == "7 Days To Die" ]; then fn_details_sdtd elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then From 69e85c2cb16b9b95699837520cc6b022b92a4d5f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 15 Oct 2016 13:32:17 +0100 Subject: [PATCH 51/51] removed fn_user_input_config from JC2 --- lgsm/functions/install_config.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 66b38c191..fa6adf9e4 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -223,7 +223,6 @@ elif [ "${gamename}" == "Just Cause 2" ]; then array_configs+=( config.lua ) fn_fetch_default_config fn_default_config_remote - fn_user_input_config elif [ "${gamename}" == "Killing Floor" ]; then gamedirname="KillingFloor" array_configs+=( Default.ini )