diff --git a/JediKnight2/jk2server b/JediKnight2/jk2server new file mode 100644 index 000000000..8d4b29a09 --- /dev/null +++ b/JediKnight2/jk2server @@ -0,0 +1,198 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# Purpose: Jedi Knight II: Jedi Outcast | Server Management Script +# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors +# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki +# Website: https://gameservermanagers.com + +# Debugging +if [ -f ".dev-debug" ]; then + exec 5>dev-debug.log + BASH_XTRACEFD="5" + set -x +fi + +version="161125" + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login +steamuser="username" +steampass="password" + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +defaultmap="ffa_bespin" +ip="0.0.0.0" +port="27960" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="+set sv_punkbuster 0 +set fs_basepath ${filesdir} +set dedicated 1 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## SteamCMD Settings +# Server appid +appid="6030" +# Steam App Branch Select +# Allows to opt into the various Steam app branches. Default branch is "". +# Example: "-beta latest_experimental" +branch="" + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="nateberkopec" +githubrepo="LinuxGSM" +githubbranch="jk2" + +## LinuxGSM Server Details +# Do not edit +gamename="Jedi Knight II: Jedi Outcast" +engine="idtech3" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="jk2ded" + +#### Directories #### +# Edit with care + +## Work Directories +rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +lockselfname=".${servicename}.lock" +lgsmdir="${rootdir}/lgsm" +functionsdir="${lgsmdir}/functions" +libdir="${lgsmdir}/lib" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}/baseq3" +executabledir="${filesdir}" +executable="./q3ded" +servercfg="${servicename}.cfg" +servercfgdefault="server.cfg" +servercfgdir="${systemdir}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${filesdir}/Logs" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +######################## +######## Script ######## +###### Do not edit ##### +######################## + +# Fetches core_dl for file downloads +fn_fetch_core_dl(){ +github_file_url_dir="lgsm/functions" +github_file_url_name="${functionfile}" +filedir="${functionsdir}" +filename="${github_file_url_name}" +githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}" +# If the file is missing, then download +if [ ! -f "${filedir}/${filename}" ]; then + if [ ! -d "${filedir}" ]; then + mkdir -p "${filedir}" + fi + echo -e " fetching ${filename}...\c" + # Check curl exists and use available path + curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)" + for curlcmd in ${curlpaths} + do + if [ -x "${curlcmd}" ]; then + break + fi + done + # If curl exists download file + if [ "$(basename ${curlcmd})" == "curl" ]; then + curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1) + if [ $? -ne 0 ]; then + echo -e "\e[0;31mFAIL\e[0m\n" + echo "${curlfetch}" + echo -e "${githuburl}\n" + exit 1 + else + echo -e "\e[0;32mOK\e[0m" + fi + else + echo -e "\e[0;31mFAIL\e[0m\n" + echo "Curl is not installed!" + echo -e "" + exit 1 + fi + chmod +x "${filedir}/${filename}" +fi +source "${filedir}/${filename}" +} + +core_dl.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +core_functions.sh(){ +# Functions are defined in core_functions.sh. +functionfile="${FUNCNAME}" +fn_fetch_core_dl +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 5ab856ed0..8edc61d8e 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -152,12 +152,12 @@ fn_details_gameserver(){ if [ -n "${tickrate}" ]; then echo -e "${blue}Tick rate:\t${default}${tickrate}" fi - + # Cluster (Don't Starve Together) if [ -n "${cluster}" ]; then echo -e "${blue}Cluster:\t${default}${cluster}" fi - + # Shard (Don't Starve Together) if [ -n "${shard}" ]; then echo -e "${blue}Shard:\t${default}${shard}" @@ -485,6 +485,15 @@ fn_details_quakelive(){ } | column -s $'\t' -t } +fn_details_jk2(){ + echo -e "netstat -atunp | grep jk2ded" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_details_wolfensteinenemyterritory(){ echo -e "netstat -atunp | grep etded" echo -e "" @@ -764,6 +773,8 @@ fn_display_details() { fn_details_quake3 elif [ "${gamename}" == "Quake Live" ]; then fn_details_quakelive + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + fn_details_jk2 elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 elif [ "${gamename}" == "Mumble" ]; then diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 0037185b4..9e7d20c67 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -25,6 +25,8 @@ fn_validation(){ if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; + ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} validate +quit| tee -a "${scriptlog}" fi @@ -54,4 +56,4 @@ if [ "${status}" != "0" ]; then else fn_validation fi -core_exit.sh \ No newline at end of file +core_exit.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index ae1b436ea..34e20ead0 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -342,6 +342,12 @@ functionfile="${FUNCNAME}" fn_fetch_function } +fix_jk2.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + + fix_ro.sh(){ functionfile="${FUNCNAME}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 8434f4454..5a5622be3 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -699,7 +699,7 @@ case "${getopt}" in if [ "${gamename}" == "Mumble" ]; then fn_getopt_mumble -elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then +elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_getopt_generic_no_update elif [ "${engine}" == "lwjgl2" ]; then fn_getopt_minecraft diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 85a65a814..9957bade0 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -43,6 +43,8 @@ if [ "${function_selfname}" != "command_install.sh" ]; then fix_dst.sh elif [ "${gamename}" == "GoldenEye: Source" ]; then fix_ges.sh + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + fix_jk2.sh elif [ "${gamename}" == "Insurgency" ]; then fix_ins.sh elif [ "${gamename}" == "Rust" ]; then diff --git a/lgsm/functions/fix_jk2.sh b/lgsm/functions/fix_jk2.sh new file mode 100644 index 000000000..1a8dd9aeb --- /dev/null +++ b/lgsm/functions/fix_jk2.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# LGSM fix_jk2.sh function +# Description: Resolves an issue with Jedi Knight 2. + +local commandname="FIX" +local commandaction="Fix" +local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" + +fixname="JK2 shared libraries" +fn_fix_msg_start +export LD_LIBRARY_PATH=${filesdir}:${filesdir}/lib:${LD_LIBRARY_PATH} +fn_fix_msg_end diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 09cd8900d..ed5084855 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -123,7 +123,7 @@ fn_info_config_dontstarve(){ gamemode=$(grep "game_mode" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_mode//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') tickrate=$(grep "tick_rate" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') masterport=$(grep "master_port" "${clustercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - + ip=$(grep "bind_ip" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bind_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 ipinconfigvar="bind_ip" @@ -136,7 +136,7 @@ fn_info_config_dontstarve(){ tickrate=${tickrate:-"0"} masterport=${masterport:-"0"} fi - + if [ ! -f "${servercfgfullpath}" ]; then port="${zero}" steamauthenticationport="${zero}" @@ -145,7 +145,7 @@ fn_info_config_dontstarve(){ port=$(grep "server_port" "${servercfgfullpath}" | grep "^server_port" | grep -v "#" | tr -cd '[:digit:]') steamauthenticationport=$(grep "authentication_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') steammasterserverport=$(grep "master_server_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - + # Not Set port=${port:-"0"} steamauthenticationport=${steamauthenticationport:-"0"} @@ -275,6 +275,26 @@ fn_info_config_quakelive(){ fi } +fn_info_config_jk2(){ + if [ ! -f "${servercfgfullpath}" ]; then + rconpassword="${unavailable}" + servername="${unavailable}" + serverpassword="${unavailable}" + maxplayers="${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]*//' -e 's/[ \t]*$//') + servername=$(grep "sv_hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') + + # Not Set + rconpassword=${rconpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + fi +} + fn_info_config_wolfensteinenemyterritory(){ if [ ! -f "${servercfgfullpath}" ]; then rconpassword="${unavailable}" @@ -590,6 +610,9 @@ elif [ "${gamename}" == "Quake 3: Arena" ]; then # Quake Live elif [ "${gamename}" == "Quake Live" ]; then fn_info_config_quakelive +# Jedi Outcast +elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + fn_info_config_jk2 # Minecraft elif [ "${engine}" == "lwjgl2" ]; then fn_info_config_minecraft @@ -627,4 +650,4 @@ elif [ "${gamename}" == "7 Days To Die" ]; then fn_info_config_sdtd elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_info_config_wolfensteinenemyterritory -fi \ No newline at end of file +fi diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index b8b29239c..f37b3d142 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -62,6 +62,9 @@ elif [ "${gamename}" == "Quake 3: Arena" ]; then elif [ "${gamename}" == "Quake Live" ]; then glibcrequired="2.15" glibcfix="no" +elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + glibcrequired="2.1" + glibcfix="no" elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index b5f7a1148..4e4c594cd 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -10,11 +10,11 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_fetch_default_config(){ mkdir -pv "${lgsmdir}/default-configs" - githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" + githuburl="https://github.com/nateberkopec/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" + fileurl="https://raw.githubusercontent.com/nateberkopec/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 } @@ -83,20 +83,20 @@ fn_set_dst_config_vars(){ randomkey=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}" sleep 1 - else + else echo "${clustercfg} is already configured." fn_script_log_info "${clustercfg} is already configured." fi - + ## server.ini # removing unnecessary options (dependent on sharding & shard type) - if [ "${sharding}" == "false" ]; then + if [ "${sharding}" == "false" ]; then sed -i "s/ISMASTER//g" "${servercfgfullpath}" sed -i "/SHARDNAME/d" "${servercfgfullpath}" elif [ "${master}" == "true" ]; then sed -i "/SHARDNAME/d" "${servercfgfullpath}" fi - + echo "changing shard name." fn_script_log_info "changing shard name." sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}" @@ -105,7 +105,7 @@ fn_set_dst_config_vars(){ fn_script_log_info "changing master setting." sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}" sleep 1 - + ## worldgenoverride.lua if [ "${cave}" == "true" ]; then echo "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua." @@ -385,6 +385,12 @@ elif [ "${gamename}" == "Quake Live" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + gamedirname="JediKnight2" + array_configs+=( server.cfg ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "QuakeWorld" ]; then gamedirname="QuakeWorld" array_configs+=( server.cfg ) @@ -482,4 +488,4 @@ elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -fi \ No newline at end of file +fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index bc28bd2f2..04e8e8bdb 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -25,8 +25,8 @@ fn_install_server_files(){ fileurl="http://files.gameservermanagers.com/Quake2/quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="quake2-3.20-glibc-i386-full-linux2.0.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="0b8c7e2d51f40b56b328c69e986e7c5f" elif [ "${gamename}" == "Quake 3: Arena" ]; then fileurl="http://files.gameservermanagers.com/Quake3/quake3-1.32c-x86-full-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="quake3-1.32c-x86-full-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="fd7258d827474f67663dda297bff4306" - elif [ "${gamename}" == "QuakeWorld" ]; then - fileurl="http://files.gameservermanagers.com/QuakeWorld/nquake.server.linux.083116.full.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="nquake.server.linux.083116.full.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="75a409cf08d808f075e4dacdc7b21b78" + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + fileurl="http://www.nateberkopec.com/jk2.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="jk2.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="605081820bc570e6424858aa165f790c" 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 99" ]; then @@ -78,6 +78,9 @@ fn_install_server_files_steamcmd(){ if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$? + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit + local exitcode=$? else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit local exitcode=$? @@ -86,6 +89,9 @@ fn_install_server_files_steamcmd(){ if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit + local exitcode=$? else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 167daf5fb..14a1334d0 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -27,6 +27,8 @@ fn_update_steamcmd_dl(){ if [ "${engine}" == "goldsource" ]; then ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" + elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; + ${unbuffer} ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" else ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" ${branch} +quit | tee -a "${scriptlog}" fi