Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ut4-parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Nov 7, 2023
2 parents 94038b5 + bbcadfb commit 6783d1e
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 179 deletions.
2 changes: 1 addition & 1 deletion lgsm/config-default/config-lgsm/colserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ querymode="2"
querytype="protocol-valve"

## Console type
consoleverbose="no"
consoleverbose="yes"
consoleinteract="no"

## Game Server Details
Expand Down
6 changes: 1 addition & 5 deletions lgsm/config-default/config-lgsm/cs2server/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

#### Game Server Settings ####

## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
steamuser="username"
steampass='password'

## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
# https://docs.linuxgsm.com/game-servers/counter-strike-2
# [Game Modes] gametype gamemode gamemodeflags skirmishid mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
Expand Down Expand Up @@ -48,7 +44,7 @@ tickrate="64"
gslt=""

## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-dedicated +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type 0 +game_mode 1 +sv_logfile 1 -serverlogging +exec ${selfname}.cfg"
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -tickrate ${tickrate} -serverlogging +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type ${gametype} +game_mode ${gamemode} +sv_game_mode_flags ${gamemodeflags} +sv_skirmish_id ${skirmishid} +sv_logfile 1 +exec ${selfname}.cfg"

#### LinuxGSM Settings ####

Expand Down
2 changes: 1 addition & 1 deletion lgsm/config-default/config-lgsm/ctserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ querymode="1"
querytype=""

## Console type
consoleverbose="no"
consoleverbose="yes"
consoleinteract="yes"

## Game Server Details
Expand Down
2 changes: 1 addition & 1 deletion lgsm/config-default/config-lgsm/hcuserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ querymode="1"
querytype=""

## Console type
consoleverbose="no"
consoleverbose="yes"
consoleinteract="no"

## Game Server Details
Expand Down
4 changes: 2 additions & 2 deletions lgsm/config-default/config-lgsm/sampserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ querymode="3"
querytype="samp"

## Console type
consoleverbose=""
consoleinteract=""
consoleverbose="no"
consoleinteract="no"

## Game Server Details
# Do not edit
Expand Down
4 changes: 2 additions & 2 deletions lgsm/config-default/config-lgsm/wurmserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ querymode="2"
querytype="protocol-valve"

## Console type
consoleverbose=""
consoleinteract=""
consoleverbose="yes"
consoleinteract="no"

## Game Server Details
# Do not edit
Expand Down
4 changes: 2 additions & 2 deletions lgsm/modules/check_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ fi
# Will warn user if their distro is no longer supported by the vendor.
if [ -n "${distrosupport}" ]; then
if [ "${distrosupport}" == "unsupported" ]; then
fn_print_warning_nl "${distroname} is no longer supported by the vendor. Upgrading is recommended."
fn_script_log_warn "${distroname} is no longer supported by the vendor. Upgrading is recommended."
fn_print_warning_nl "${distroname} is no longer supported by the vendor or LinuxGSM. Upgrading is recommended."
fn_script_log_warn "${distroname} is no longer supported by the vendor or LinuxGSM. Upgrading is recommended."
fi
fi

Expand Down
57 changes: 36 additions & 21 deletions lgsm/modules/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,57 @@ info_distro.sh
# RAM requirements in megabytes for each game or engine.

if [ "${shortname}" == "ark" ]; then
ramrequirementmb="4000"
ramrequirementgb="4"
ramrequirementgb="7"
elif [ "${shortname}" == "arma3" ]; then
ramrequirementgb="2"
elif [ "${shortname}" == "armar" ]; then
ramrequirementgb="3"
elif [ "${shortname}" == "bt" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${shortname}" == "mh" ]; then
ramrequirementmb="4000"
ramrequirementgb="4"
elif [ "${shortname}" == "arma3" ]; then
ramrequirementmb="1000"
elif [ "${shortname}" == "cc" ]; then
ramrequirementgb="1"
elif [ "${shortname}" == "rust" ]; then
ramrequirementmb="4000"
elif [ "${shortname}" == "dayz" ]; then
ramrequirementgb="5"
elif [ "${shortname}" == "dodr" ]; then
ramrequirementgb="2"
elif [ "${shortname}" == "hw" ]; then
ramrequirementgb="3"
elif [ "${shortname}" == "mc" ]; then
ramrequirementgb="1"
elif [ "${shortname}" == "pmc" ]; then
ramrequirementgb="2"
elif [ "${shortname}" == "mh" ]; then
ramrequirementgb="4"
elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then
ramrequirementmb="1000"
elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then
ramrequirementgb="1"
elif [ "${shortname}" == "ps" ]; then
ramrequirementmb="2000"
ramrequirementgb="2"
elif [ "${shortname}" == "ns2" ] || [ "${shortname}" == "ns2c" ]; then
ramrequirementmb="1000"
elif [ "${shortname}" == "pvr" ]; then
ramrequirementgb="1"
elif [ "${shortname}" == "pz" ]; then
ramrequirementgb="3"
elif [ "${shortname}" == "rust" ]; then
ramrequirementgb="9"
elif [ "${shortname}" == "sdtd" ]; then
ramrequirementgb="4"
elif [ "${shortname}" == "squad" ]; then
ramrequirementgb="2"
elif [ "${shortname}" == "st" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
elif [ "${shortname}" == "pvr" ]; then
ramrequirementmb="2000"
elif [ "${shortname}" == "stn" ]; then
ramrequirementgb="3"
elif [ "${shortname}" == "tu" ]; then
ramrequirementgb="2"
elif [ "${shortname}" == "vh" ]; then
ramrequirementgb="2"
else
ramrequirementgb="0.5"
fi

# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
if [ "${ramrequirementmb}" ]; then
if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then
if [ "${ramrequirementgb}" ]; then
if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then
fn_print_dots "Checking RAM"
# Warn the user.
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
echo "* ${gamename} server may fail to run or experience poor performance."
fn_sleep_time_5
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/command_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn_print_header
echo -e "${lightblue}Architecture:\t\t${default}${arch}"
echo -e "${lightblue}Kernel:\t\t${default}${kernel}"
echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}"
echo -e "${lightblue}tmux:\t\t${default}${tmuxv}"
echo -e "${lightblue}tmux:\t\t${default}${tmuxversion}"
echo -e "${lightblue}Avg Load:\t\t${default}${load}"
echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}"
echo -e "${lightblue}Free Disk:\t\t${default}${availspace}"
Expand Down
46 changes: 11 additions & 35 deletions lgsm/modules/command_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,47 +73,23 @@ fn_start_tmux() {
touch "${consolelog}"

# tmux compiled from source will return "master", therefore ignore it.
if [ "${tmuxv}" == "master" ]; then
if [ "${tmuxversion}" == "master" ]; then
fn_script_log "tmux version: master (user compiled)"
echo -e "tmux version: master (user compiled)" >> "${consolelog}"
if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
if [ "${logtimestamp}" == "on" ]; then
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
else
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
fi
fi
fi

elif [ -n "${tmuxv}" ]; then
# tmux pipe-pane not supported in tmux versions < 1.6.
if [ "${tmuxvdigit}" -lt "16" ]; then
echo -e "Console logging disabled: tmux => 1.6 required
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"

# Console logging disabled: Bug in tmux 1.8 breaks logging.
elif [ "${tmuxvdigit}" -eq "18" ]; then
echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging enable or not set.
elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
if [ "${logtimestamp}" == "on" ]; then
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
else
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
fi
# Enable console logging.
if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
if [ "${logtimestamp}" == "on" ]; then
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
else
tmux -L "${socketname}" pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
fi
else
echo -e "Unable to detect tmux version" >> "${consolelog}"
fn_script_log_warn "Unable to detect tmux version"
fi

# Console logging disabled.
if [ "${consolelogging}" == "off" ]; then
echo -e "Console logging disabled in settings" >> "${consolelog}"
fn_script_log_info "Console logging disabled by user"
fn_script_log_info "Console logging disabled in settings"
fi

fn_sleep_time_1

# If the server fails to start.
Expand All @@ -123,7 +99,7 @@ fn_start_tmux() {
fn_script_log_fail "Unable to start ${servername}"
if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then
fn_print_fail_nl "Unable to start ${servername}: tmux error:"
fn_script_log_fail "Unable to start ${servername}: tmux error:"
fn_script_log_fail "Unable to start ${servername}: tmux error"
echo -e ""
echo -e "Command"
fn_messages_separator
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/core_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

modulesversion="v23.6.0"
modulesversion="v23.6.2"

# Core

Expand Down
Loading

0 comments on commit 6783d1e

Please sign in to comment.