From 8830bad9a891d3a46a7c010f323c3f76b450e24c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 30 Oct 2023 21:05:32 +0000 Subject: [PATCH 01/28] Feature/stats change (#4363) * feat: update unsupprted distros and add comments to info_distro * remove tmux 1.6 code * add java and tmux version and change ram to int * tidy up ram requirements used data gathered from analytics --- lgsm/modules/check_deps.sh | 4 +- lgsm/modules/check_system_requirements.sh | 57 ++++--- lgsm/modules/command_debug.sh | 2 +- lgsm/modules/command_start.sh | 46 ++---- lgsm/modules/info_distro.sh | 184 +++++++++++----------- lgsm/modules/info_messages.sh | 8 +- lgsm/modules/info_stats.sh | 18 ++- 7 files changed, 154 insertions(+), 165 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 0f8304a183..b7b9f4758c 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -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 diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index 6932de4dc7..bdf1a51c18 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -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 diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh index 495417c161..2e6c0e2e20 100644 --- a/lgsm/modules/command_debug.sh +++ b/lgsm/modules/command_debug.sh @@ -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}" diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 345ede7861..f38125a5e1 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -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. @@ -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 diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index a5607ef45a..828946139e 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -21,114 +21,107 @@ fi ## Distro # Returns architecture, kernel and distro/os. -arch="$(uname -m)" -kernel="$(uname -r)" - -# Distro Name - Ubuntu 16.04 LTS -# Distro Version - 16.04 -# Distro ID - ubuntu -# Distro Codename - xenial +arch="$(uname -m)" # Architecture e.g. x86_64 +kernel="$(uname -r)" # Kernel e.g. 2.6.32-042stab120.16 # Gathers distro info from various sources filling in missing gaps. distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then - distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" - # Special var for rhel like distros to removed point in number e.g 8.4 to just 8. - distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 + # Special var for rhel like distros to remove point in number e.g 8.4 to just 8. + if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then + distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8 + fi + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. debian + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ]; then - distroname="$(lsb_release -sd)" + distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS elif [ -z "${distroversion}" ]; then - distroversion="$(lsb_release -sr)" + distroversion="$(lsb_release -sr)" # e.g. 22.04 elif [ -z "${distroid}" ]; then - distroid="$(lsb_release -si)" + distroid="$(lsb_release -si)" # e.g. Ubuntu elif [ -z "${distrocodename}" ]; then - distrocodename="$(lsb_release -sc)" + distrocodename="$(lsb_release -sc)" # e.g. jammy fi elif [ "$(command -v hostnamectl 2> /dev/null)" ] && [ "${distro_info}" == "hostnamectl" ]; then if [ -z "${distroname}" ]; then - distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" + distroname="$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')" # e.g. Ubuntu 22.04.3 LTS fi elif [ -f "/etc/debian_version" ] && [ "${distro_info}" == "debian_version" ]; then if [ -z "${distroname}" ]; then - distroname="Debian $(cat /etc/debian_version)" + distroname="Debian $(cat /etc/debian_version)" # e.g. Debian bookworm/sid elif [ -z "${distroversion}" ]; then - distroversion="$(cat /etc/debian_version)" + distroversion="$(cat /etc/debian_version)" # e.g. bookworm/sid elif [ -z "${distroid}" ]; then distroid="debian" fi elif [ -f "/etc/redhat-release" ] && [ "${distro_info}" == "redhat-release" ]; then if [ -z "${distroname}" ]; then - distroname="$(cat /etc/redhat-release)" + distroname="$(cat /etc/redhat-release)" # e.g. Rocky Linux release 9.2 (Blue Onyx) elif [ -z "${distroversion}" ]; then - distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora" | cut -d"-" -f3)" + distroversion="$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos|fedora|rocky|alma" | cut -d"-" -f3)" # e.g. 9.2 elif [ -z "${distroid}" ]; then - distroid="$(awk '{print $1}' /etc/redhat-release)" + distroid="$(awk '{print $1}' /etc/redhat-release)" # e.g. Rocky fi fi done # Get virtual environment type. if [ "$(command -v systemd-detect-virt 2> /dev/null)" ]; then - virtualenvironment="$(systemd-detect-virt)" + virtualenvironment="$(systemd-detect-virt)" # e.g. kvm fi -# Some RHEL based distros use 8.4 instead of just 8. -if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then - distroversioncsv="${distroversionrh}" +# distroversioncsv is used for selecting the correct distro csv in data directory +if [ -n "${distroversionrh}" ]; then + distroversioncsv="${distroversionrh}" # e.g. 8 else - distroversioncsv="${distroversion}" + distroversioncsv="${distroversion}" # e.g. 22.04 fi # Check if distro supported by distro vendor. +# distro-info available in debian based distros. if [ "$(command -v distro-info 2> /dev/null)" ]; then distrosunsupported="$(distro-info --unsupported)" distrosunsupported_array=("${distrosunsupported}") for distrounsupported in "${distrosunsupported_array[@]}"; do if [ "${distrounsupported}" == "${distrocodename}" ]; then - distrosupport=unsupported + distrosupport="unsupported" break else - distrosupport=supported + distrosupport="supported" fi done -else - distrosupport=unknown +elif [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then + # RHEL/CentOS 7 EOL 2024-06-30. Will be unsupported after this date. + if [ "${distroversionrh}" -lt "8" ] && [ "$(date +%s)" -lt "1719705600" ]; then + distrosupport="unsupported" + else + distrosupport="supported" + fi fi ## Glibc version -# e.g: 1.17 -glibcversion="$(ldd --version | sed -n '1s/.* //p')" +glibcversion="$(ldd --version | sed -n '1s/.* //p')" # e.g: 2.17 ## tmux version -# e.g: tmux 1.6 -if [ ! "$(command -V tmux 2> /dev/null)" ]; then - tmuxv="${red}NOT INSTALLED!${default}" - tmuxvdigit="0" -else - tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" - if [ "${tmuxvdigit}" -lt "16" ]; then - tmuxv="$(tmux -V) (>= 1.6 required for console log)" - else - tmuxv="$(tmux -V)" - fi +if [ "$(command -V tmux 2> /dev/null)" ]; then + tmuxversion="$(tmux -V | awk '{print $2}')" # e.g: tmux 3.3 fi if [ "$(command -V java 2> /dev/null)" ]; then - javaversion="$(java -version 2>&1 | grep "version")" + javaversion="$(java -version 2>&1 | grep "version")" # e.g: openjdk version "17.0.8.1" 2023-08-24 fi if [ "$(command -v mono 2> /dev/null)" ]; then - monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" + monoversion="$(mono --version 2>&1 | grep -Po '(?<=version )\d')" # e.g: 6 fi if [ "$(command -v dotnet 2> /dev/null)" ]; then - dotnetversion="$(dotnet --list-runtimes | grep -E 'Microsoft\.NETCore\.App' | awk '{print $2}')" + dotnetversion="$(dotnet --list-runtimes | grep -E 'Microsoft\.NETCore\.App' | awk '{print $2}')" # e.g: 6.0.0 fi ## Uptime @@ -141,16 +134,16 @@ days="$((uptime / 60 / 60 / 24))" ### Performance information ## Average server load -load="$(uptime | awk -F 'load average: ' '{ print $2 }')" +load="$(uptime | awk -F 'load average: ' '{ print $2 }')" # e.g 0.01, 0.05, 0.11 ## CPU information -cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +cpumodel="$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" # e.g Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz cpucores="$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)" -cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" +cpufreqency="$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')" # e.g 2394.503 # CPU usage of the game server pid if [ -n "${gameserverpid}" ]; then - cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" - cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" + cpuused="$(ps --forest -o pcpu -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" # integer + cpuusedmhz="$(echo "${cpufreqency} * ${cpuused} / 100" | bc)" # integer fi ## Memory information @@ -161,36 +154,35 @@ if [ "$(command -v numfmt 2> /dev/null)" ]; then # Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated. # get the raw KB values of these fields. - physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" - physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" - physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" - physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" - physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" + physmemtotalkb="$(grep MemTotal /proc/meminfo | awk '{print $2}')" # integer + physmemfreekb="$(grep ^MemFree /proc/meminfo | awk '{print $2}')" # integer + physmembufferskb="$(grep ^Buffers /proc/meminfo | awk '{print $2}')" # integer + physmemcachedkb="$(grep ^Cached /proc/meminfo | awk '{print $2}')" # integer + physmemreclaimablekb="$(grep ^SReclaimable /proc/meminfo | awk '{print $2}')" # integer # check if MemAvailable Exists. if grep -q ^MemAvailable /proc/meminfo; then - physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" + physmemactualfreekb="$(grep ^MemAvailable /proc/meminfo | awk '{print $2}')" # integer else - physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" + physmemactualfreekb="$((physmemfreekb + physmembufferskb + physmemcachedkb))" # integer fi # Available RAM and swap. - physmemtotalmb="$((physmemtotalkb / 1024))" - physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" - physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" - physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" - physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" - - swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" - swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" - swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" + physmemtotalmb="$(((physmemtotalkb + 512) / 1024))" # integer # integer + physmemtotalgb="$(((physmemtotalmb + 512) / 1024))" # integer # integer + physmemtotal="$(numfmt --to=iec --from=iec --suffix=B "${physmemtotalkb}K")" # string + physmemfree="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" # string + physmemused="$(numfmt --to=iec --from=iec --suffix=B "$((physmemtotalkb - physmemfreekb - physmembufferskb - physmemcachedkb - physmemreclaimablekb))K")" # string + physmemavailable="$(numfmt --to=iec --from=iec --suffix=B "${physmemactualfreekb}K")" # string + physmemcached="$(numfmt --to=iec --from=iec --suffix=B "$((physmemcachedkb + physmemreclaimablekb))K")" # string + + swaptotal="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapTotal /proc/meminfo | awk '{print $2}')K")" # string + swapfree="$(numfmt --to=iec --from=iec --suffix=B "$(grep ^SwapFree /proc/meminfo | awk '{print $2}')K")" # string + swapused="$(numfmt --to=iec --from=iec --suffix=B "$(($(grep ^SwapTotal /proc/meminfo | awk '{print $2}') - $(grep ^SwapFree /proc/meminfo | awk '{print $2}')))K")" # string # RAM usage of the game server pid - # MB if [ "${gameserverpid}" ]; then - memused="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" - # % - pmemused="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" + memusedmb="$(ps --forest -o rss -g "${gameserverpid}" | awk '{s+=$1} END {print s}' | awk '{$1/=1024;printf "%.0f",$1}{print $2}')" # integer + memusedpct="$(ps --forest -o %mem -g "${gameserverpid}" | awk '{s+=$1} END {print s}')" # integer fi else # Older distros will need to use free. @@ -203,32 +195,32 @@ else else humanreadable="-h" fi - physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" - physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" - physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" - physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" + physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # string + physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string + physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string + physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string oldfree="$(free ${humanreadable} | awk '/cache:/')" if [ "${oldfree}" ]; then physmemavailable="n/a" physmemcached="n/a" else - physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" - physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" + physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string + physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string fi - swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" - swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" - swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" + swaptotal="$(free ${humanreadable} | awk '/Swap:/ {print $2}')" # string + swapused="$(free ${humanreadable} | awk '/Swap:/ {print $3}')" # string + swapfree="$(free ${humanreadable} | awk '/Swap:/ {print $4}')" # string fi ### Disk information ## Available disk space on the partition. -filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" -totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" -usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" -availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" +filesystem="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $1}')" # string e.g /dev/sda +totalspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $2}')" # string e.g 20G +usedspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $3}')" # string e.g 15G +availspace="$(LC_ALL=C df -hP "${rootdir}" | tail -n 1 | awk '{print $4}')" # string e.g 5G ## LinuxGSM used space total. rootdirdu="$(du -sh "${rootdir}" 2> /dev/null | awk '{print $1}')" @@ -263,21 +255,21 @@ if [ -d "${backupdir}" ]; then # If there are backups in backup dir. if [ "$(find "${backupdir}" -name "*.tar.gz" | wc -l)" -ne "0" ]; then # number of backups. - backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" + backupcount="$(find "${backupdir}"/*.tar.gz | wc -l)" # integer # most recent backup. - lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" + lastbackup="$(ls -1t "${backupdir}"/*.tar.gz | head -1)" # string # date of most recent backup. - lastbackupdate="$(date -r "${lastbackup}")" + lastbackupdate="$(date -r "${lastbackup}")" # string # no of days since last backup. - lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" + lastbackupdaysago="$((($(date +'%s') - $(date -r "${lastbackup}" +'%s')) / 60 / 60 / 24))" # integer # size of most recent backup. - lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" + lastbackupsize="$(du -h "${lastbackup}" | awk '{print $1}')" # string fi fi # Network Interface name -netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') -netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') +netint=$(${ipcommand} -o addr | grep "${ip}" | awk '{print $2}') # e.g eth0 +netlink=$(${ethtoolcommand} "${netint}" 2> /dev/null | grep Speed | awk '{print $2}') # e.g 1000Mb/s # Sets the SteamCMD glibc requirement if the game server requirement is less or not required. if [ "${appid}" ]; then @@ -286,5 +278,5 @@ if [ "${appid}" ]; then fi fi -# Gather Port Info using ss +# Gather Port Info using ss. ssinfo="$(ss -tuplwn)" diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 0b928aa55e..926165b285 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -95,7 +95,7 @@ fn_info_messages_distro() { echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}" echo -e "${lightblue}Environment:\t${default}${virtualenvironment}" echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m" - echo -e "${lightblue}tmux:\t${default}${tmuxv}" + echo -e "${lightblue}tmux:\t${default}${tmuxversion}" echo -e "${lightblue}glibc:\t${default}${glibcversion}" if [ -n "${javaram}" ]; then echo -e "${lightblue}Java:\t${default}${javaversion}" @@ -191,10 +191,10 @@ fn_info_messages_gameserver_resource() { else echo -e "${lightblue}CPU Used:\t${red}unknown${default}" fi - if [ -n "${memused}" ]; then - echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}" + if [ -n "${memusedmb}" ]; then + echo -e "${lightblue}Mem Used:\t${default}${memusedpct}%\t${memusedmb}MB${default}" else - echo -e "${lightblue}Mem Used:\t${default}${pmemused}\t${red}unknown${default}" + echo -e "${lightblue}Mem Used:\t${default}${memusedpct}\t${red}unknown${default}" fi else echo -e "${lightblue}CPU Used:\t${default}0%${default}" diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh index 8f0119532e..dcc247b598 100644 --- a/lgsm/modules/info_stats.sh +++ b/lgsm/modules/info_stats.sh @@ -54,7 +54,10 @@ uuidhardware=$(cat "/etc/machine-id") # nearest 100Mhz. cpuusedmhzroundup="$(((cpuusedmhz + 99) / 100 * 100))" # nearest 100MB -memusedroundup="$(((memused + 99) / 100 * 100))" +memusedmbroundup="$(((memusedmb + 99) / 100 * 100))" + +# Convert any commas to dots. +physmemtotal="${physmemtotal//,/.}" apisecret="A-OzP02TSMWt4_vHi6ZpUw" measurementid="G-0CR8V7EMT5" @@ -66,22 +69,25 @@ payload="{ { \"name\": \"LinuxGSM\", \"params\": { - \"cpuusedmhzroundup\": \"${cpuusedmhzroundup}MHz\", + \"cpuusedmhzroundup\": \"${cpuusedmhzroundup}\", \"diskused\": \"${serverfilesdu}\", \"distro\": \"${distroname}\", \"game\": \"${gamename}\", - \"memusedroundup\": \"${memusedroundup}MB\", - \"ramused\": \"${memusedroundup}MB\", + \"memusedmbroundup\": \"${memusedmbroundup}\", + \"ramused\": \"${memusedmbroundup}\", \"servercpu\": \"${cpumodel} ${cpucores} cores\", \"servercpufreq\": \"${cpufreqency} x${cpucores}\", \"serverdisk\": \"${totalspace}\", \"serverfilesdu\": \"${serverfilesdu}\", \"serverram\": \"${physmemtotal}\", + \"serverramgb\": \"${physmemtotalgb}\", \"uuidhardware\": \"${uuidhardware}\", \"uuidinstall\": \"${uuidinstall}\", \"uuidinstance\": \"${uuidinstance}\", \"version\": \"${version}\", - \"virtualenvironment\": \"${virtualenvironment}\" + \"virtualenvironment\": \"${virtualenvironment}\", + \"tmuxversion\": \"${tmuxversion}\", + \"java\": \"${javaversion}\" } } ] @@ -156,7 +162,7 @@ fn_script_log_info "* uuid-hardware: ${uuidhardware}" fn_script_log_info "* Game Name: ${gamename}" fn_script_log_info "* Distro Name: ${distroname}" fn_script_log_info "* Game Server CPU Used: ${cpuusedmhzroundup}MHz" -fn_script_log_info "* Game Server RAM Used: ${memusedroundup}MB" +fn_script_log_info "* Game Server RAM Used: ${memusedmbroundup}MB" fn_script_log_info "* Game Server Disk Used: ${serverfilesdu}" fn_script_log_info "* Server CPU Model: ${cpumodel}" fn_script_log_info "* Server CPU Frequency: ${cpufreqency}" From 536c65cc5d820b936a2abfe6e988c0698ea6d956 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Nov 2023 14:50:13 +0000 Subject: [PATCH 02/28] fix: correct consoleverbose settings --- lgsm/config-default/config-lgsm/colserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ctserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/hcuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sampserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/wurmserver/_default.cfg | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg index 63182f515d..1c3b261e20 100644 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -136,7 +136,7 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="no" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/ctserver/_default.cfg b/lgsm/config-default/config-lgsm/ctserver/_default.cfg index 74bd230c7d..ea1ae52296 100644 --- a/lgsm/config-default/config-lgsm/ctserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ctserver/_default.cfg @@ -135,7 +135,7 @@ querymode="1" querytype="" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="yes" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index 225482c698..af819305cc 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -150,7 +150,7 @@ querymode="1" querytype="" ## Console type -consoleverbose="no" +consoleverbose="yes" consoleinteract="no" ## Game Server Details diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 1dbeaaccfd..510b9a6896 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -126,8 +126,8 @@ querymode="3" querytype="samp" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="no" +consoleinteract="no" ## Game Server Details # Do not edit diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 5405be85a9..b27783cf4b 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -179,8 +179,8 @@ querymode="2" querytype="protocol-valve" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="yes" +consoleinteract="no" ## Game Server Details # Do not edit From 283e6257a0a3e1a343cb273538e8a93e410c15ee Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 13 Nov 2023 23:59:21 +0000 Subject: [PATCH 03/28] feat: Update UE4/UE5 parameters and configs (#4378) * feat(ark): move rconport and maxplayers to config * feat(sbots): removed ? from parameters * feat(tu): shuffle parameters and use pascal case * feat(mom): Pascal Case parameters * add ohd configs * re order * sync with configs * feat(btl): standardise configs and parameters to match other ue4 games * standardise * feat(sf): upgrade to ue5 * add ram requirements to satisfactory * sf fix * tidy up parameters * update ark parameters * minor changes * updated the isle to UE5 * add game server docs * move log * tidy --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 5 ++--- lgsm/config-default/config-lgsm/btlserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/hcuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/inssserver/_default.cfg | 6 +++--- lgsm/config-default/config-lgsm/mhserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/momserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/ohdserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/onsetserver/_default.cfg | 1 + lgsm/config-default/config-lgsm/psserver/_default.cfg | 6 +----- lgsm/config-default/config-lgsm/pvrserver/_default.cfg | 5 +++-- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/sfserver/_default.cfg | 7 ++++--- lgsm/config-default/config-lgsm/squadserver/_default.cfg | 4 ++-- lgsm/config-default/config-lgsm/tiserver/_default.cfg | 3 ++- lgsm/config-default/config-lgsm/tuserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/ut3server/_default.cfg | 2 +- lgsm/modules/check_system_requirements.sh | 2 ++ lgsm/modules/info_game.sh | 2 ++ lgsm/modules/info_messages.sh | 2 +- lgsm/modules/install_config.sh | 4 ++-- 20 files changed, 38 insertions(+), 33 deletions(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 7f38c974f4..123749452b 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -12,14 +12,13 @@ ip="0.0.0.0" port="7777" queryport="27015" -rconport="27020" # Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis, Gen2 defaultmap="TheIsland" altsavedirectoryname="${defaultmap}" -maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${publicip}" +## Game Server Docs | https://ark.wiki.gg/wiki/Server_configuration +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg index b6cf3da347..dcc49c61c6 100644 --- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg @@ -14,7 +14,7 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${publicip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +startparameters="-Port=${port} -QueryPort=${queryport} -BroadcastIp=${publicip} -log" #### LinuxGSM Settings #### @@ -157,8 +157,8 @@ systemdir="${serverfiles}/Battalion" executabledir="${systemdir}/Binaries/Linux" executable="./BattalionServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" -servercfg="${selfname}.ini" -servercfgdefault="DefaultGame.ini" +servercfg="Game.ini" +servercfgdefault="Game.ini" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory diff --git a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg index af819305cc..67deef6693 100644 --- a/lgsm/config-default/config-lgsm/hcuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hcuserver/_default.cfg @@ -17,7 +17,7 @@ queryport="27015" servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?Difficulty=1?Game=DM?MapList=KidsBedroom,Playground,Garden,Hallway_Simple,Bathroom,Hallway_Hard,Attic_Daytime,Shed,ToyPalace,Kitchen,Garage?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600?ScoreLimit=30?Teamplay -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" +startparameters="${defaultmap}?MaxPlayers=${maxplayers} -ServerName='${servername}' -Port=${port} -QueryPort=${queryport}" ## Server Parameters for Plague mode #startparameters="${defaultmap}?Game=PL?MapList=KidsBedroom,Garden,Hallway_Simple,Attic_Daytime,Garage,Shed,Kitchen,Hallway_Hard,ToyPalace,Bathroom?MaxPlayers=${maxplayers}?WeaponTypes=7?TimeLimit=600 -ServerName='${servername}' -Port=${port} -QueryPort=${queryport} -NOCONSOLE -unattended" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 13addae47f..8d14e79ea0 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -15,8 +15,8 @@ queryport="27131" rconport="27015" rconpassword="" servername="LinuxGSM" -defaultmap="Canyon" -defaultscenario="Scenario_Crossing_Push_Security" +defaultmap="Oilfield" +defaultscenario="Scenario_Refinery_Push_Security" maxplayers="28" ## Game Server Login Token (GSLT): Optional @@ -25,7 +25,7 @@ maxplayers="28" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -## Parameter Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide +## Game Server Docs | https://mod.io/g/insurgencysandstorm/r/server-admin-guide startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -Rcon -RconPassword=${rconpassword} -RconListenPort=${rconport} -GSLTToken=${gslt} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index 846aed06ea..399d7c96b6 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,8 @@ queryport="27015" defaultmap="FFA_ThePit" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport} -GameIni=${servercfgfullpath}" +## Game Server Docs | https://mordhau.fandom.com/wiki/Dedicated_Server_Hosting_Guide +startparameters="Mordhau ${defaultmap} -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport} -GameIni=${servercfgfullpath} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index c075067f50..e9b743c005 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -14,7 +14,8 @@ port="7777" beaconport="15000" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}"" +## Game Server Docs | https://memoriesofmars.fandom.com/wiki/Dedicated_Servers +startparameters="-MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg index 58a42d3b33..9eaf0d4a55 100644 --- a/lgsm/config-default/config-lgsm/ohdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ohdserver/_default.cfg @@ -12,14 +12,14 @@ ip="0.0.0.0" port="7777" queryport="27005" +rconport="7778" servername="LinuxGSM" -serverpassword="" # Maps: risala, khafji_p, lamdong, montecassino, argonne defaultmap="AAS-TestMap" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?MaxPlayers=${maxplayers}?Password=${serverpassword} -Port=${port} -QueryPort=${queryport} -SteamServerName='${servername}' -log" +startparameters="${defaultmap}?MaxPlayers=${maxplayers} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -RconPort=${rconport} -SteamServerName='${servername}' -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index b0f0d00bc1..39fc4005ce 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -9,6 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Game Server Docs | https://dev.playonset.com/wiki/DedicatedServer startparameters="--config ${servercfgfullpath}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/psserver/_default.cfg b/lgsm/config-default/config-lgsm/psserver/_default.cfg index 143a3349d2..e41dee19c1 100644 --- a/lgsm/config-default/config-lgsm/psserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/psserver/_default.cfg @@ -10,15 +10,11 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" -maxplayers="40" port="10027" queryport="10037" -randommap="NONE" -reservedslots="0" -tickrate="50" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} FIXEDMAXPLAYERS=${maxplayers} FIXEDMAXTICKRATE=${tickrate} NumReservedSlots=${reservedslots}" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index c840649006..2cffabe71b 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -17,7 +17,8 @@ defaultmap="datacenter" apikey="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Pavlov ${defaultmap} -log -MultiHome=${ip} -Port=${port} ApiKey=${apikey}" +## Game Server Docs | http://pavlovwiki.com/index.php/Setting_up_a_dedicated_server +startparameters="Pavlov ${defaultmap} -MultiHome=${ip} -Port=${port} ApiKey=${apikey} -log" #### LinuxGSM Settings #### @@ -149,7 +150,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Pavlov VR" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index ef33b7f9ae..3c6e3412e6 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="StationKappa" servername="LinuxGSM" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -startup_map ${defaultmap} -server_name '${servername}'" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index 4beb002f64..f889b4866e 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -15,7 +15,8 @@ beaconport="15000" port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="FactoryGame -multihome=${ip} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended" +## Game Server Docs | https://satisfactory.fandom.com/wiki/Dedicated_servers +startparameters="FactoryGame -MultiHome=${ip} -Port=${port} -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -log" #### LinuxGSM Settings #### @@ -147,7 +148,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="Satisfactory" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### @@ -156,7 +157,7 @@ glibc="2.17" ## Game Server Directories systemdir="${serverfiles}/FactoryGame" executabledir="${serverfiles}/Engine/Binaries/Linux" -executable="./UE4Server-Linux-Shipping" +executable="./UnrealServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="GameUserSettings.ini" servercfgdefault="GameUserSettings.ini" diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index 424d81f320..09c0e94b10 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -11,10 +11,10 @@ ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters port="7787" queryport="27165" -randommap="ALWAYS" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" +## Game Server Docs | https://squad.fandom.com/wiki/Dedicated_server +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg index dd3e1dd90a..3141983c99 100644 --- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg @@ -14,6 +14,7 @@ port="7777" defaultmap="/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +## Game Server Docs | https://isle.fandom.com/wiki/The_Isle_Server_Settings_and_Configuration startparameters="${defaultmap} -Port=${port} -log" #### LinuxGSM Settings #### @@ -146,7 +147,7 @@ consoleinteract="no" ## Game Server Details # Do not edit gamename="The Isle" -engine="unreal4" +engine="unreal5" glibc="2.17" #### Directories #### diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index 086968e98c..89c6712bd7 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -19,7 +19,7 @@ queryport="27015" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" +startparameters="-MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini -log" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index cdadca6633..4f0b6a3a04 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -29,7 +29,7 @@ gspassword="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 -startparameters="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" +startparameters="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -multihome=${ip} -port=${port} -queryport=${queryport} -nohomedir -unattended -log=${gamelog}" #### LinuxGSM Settings #### diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh index bdf1a51c18..5ffd0c8afe 100644 --- a/lgsm/modules/check_system_requirements.sh +++ b/lgsm/modules/check_system_requirements.sh @@ -45,6 +45,8 @@ elif [ "${shortname}" == "rust" ]; then ramrequirementgb="9" elif [ "${shortname}" == "sdtd" ]; then ramrequirementgb="4" +elif [ "${shortname}" == "sf" ]; then + ramrequirementgb="12" elif [ "${shortname}" == "squad" ]; then ramrequirementgb="2" elif [ "${shortname}" == "st" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index c75f1c2390..0365660a6f 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -287,6 +287,8 @@ fn_info_game_ac() { fn_info_game_ark() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "ServerAdminPassword" + fn_info_game_ini "maxplayers" "MaxPlayers" + fn_info_game_ini "rconport" "RCONPort" fn_info_game_ini "servername" "SessionName" fn_info_game_ini "serverpassword" "ServerPassword" fi diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 926165b285..abddf9fc6c 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -674,7 +674,7 @@ fn_info_messages_ports_edit() { fi done # engines/games that require editing the start parameters. - local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") + local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sf" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh") for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then startparameterslocation="${configdirserver}" diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 59bcd90f33..45773f63c7 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -245,7 +245,7 @@ elif [ "${shortname}" == "bt" ]; then fn_list_config_locations elif [ "${shortname}" == "btl" ]; then fn_check_cfgdir - array_configs+=(DefaultGame.ini) + array_configs+=(Game.ini) fn_fetch_default_config fn_default_config_remote fn_set_config_vars @@ -484,7 +484,7 @@ elif [ "${shortname}" == "hldms" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "ohd" ]; then - array_configs+=(Game.ini) + array_configs+=(Admins.cfg Engine.ini Game.ini MapCycle.cfg) fn_fetch_default_config fn_default_config_remote fn_set_config_vars From c17c41139b7c9c2f22fe64a8d0d713bcb15dcdfa Mon Sep 17 00:00:00 2001 From: Sascha Moser <28950736+xopez@users.noreply.github.com> Date: Tue, 14 Nov 2023 01:01:08 +0100 Subject: [PATCH 04/28] fix(gmod): Remove authkey (#4370) Fixes #4369 --- lgsm/config-default/config-lgsm/gmodserver/_default.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 869628e8ca..01ea819f2f 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -19,8 +19,6 @@ tickrate="66" gamemode="sandbox" ## Workshop Parameters | https://wiki.facepunch.com/gmod/Workshop_for_Dedicated_Servers -# To get an API key visit - https://steamcommunity.com/dev/apikey -wsapikey="" wscollectionid="" ## Game Server Login Token (GSLT): Optional @@ -29,7 +27,7 @@ wscollectionid="" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${wscollectionid} -authkey ${wsapikey} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -disableluarefresh" +startparameters="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${wscollectionid} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -disableluarefresh" #### LinuxGSM Settings #### From efb8426ada187527b09a3fd6d414c43b2fb57b92 Mon Sep 17 00:00:00 2001 From: chris3081 Date: Tue, 14 Nov 2023 10:02:51 +1000 Subject: [PATCH 05/28] fix(vh): Change ValheimPlus repo and adjust fix_vh (#4373) Change ValheimPlus repo and adjust fix_vh to remove unstripped_contrib folder and comment out all references in scripts to that directory. --- lgsm/modules/fix_vh.sh | 6 ++++++ lgsm/modules/mods_list.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index c642a1a57d..ff02eaddd9 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -17,6 +17,12 @@ if [ -f "${modsinstalledlistfullpath}" ]; then echo 'executable="./start_server_bepinex.sh"' >> "${configdirserver}/${selfname}.cfg" executable="./start_server_bepinex.sh" fi + if [ -d "${serverfiles}/unstripped_corlib" ]; then + rm -rf "${serverfiles}/unstripped_corlib" + fi + sed -i 's/^dllSearchPathOverride=unstripped_corlib/# &/' "${serverfiles}/doorstop_config.ini" + sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/' "${serverfiles}/start_game_bepinex.sh" + sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/' "${serverfiles}/start_server_bepinex.sh" fi # special exports for BepInEx if installed if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index e093124e96..95ab63d993 100644 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -200,7 +200,7 @@ mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlin mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatestlink}" "Oxide.SevenDaysToDie.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "7 Days To Die;" "NOTGAMES" "https://umod.org/games/7-days-to-die" "Allows for the use of plugins") # ValheimPlus -mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/valheimPlus/ValheimPlus" "Mod to improve Valheim gameplay") +mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/Grantapher/ValheimPlus.git" "Mod to improve Valheim gameplay") # BepInEx Valheim mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework") From f80a1b69fd5a914c942aa18f083ad510656af328 Mon Sep 17 00:00:00 2001 From: Phillip Birmingham Date: Fri, 17 Nov 2023 16:03:25 -0600 Subject: [PATCH 06/28] fix(arma3server): remove quotes from around mod list in Arma3 server command line (#4288) * build(deps): bump github/issue-labeler from 3.1 to 3.2 (#4258) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from 3.1 to 3.2. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v3.1...v3.2) --- updated-dependencies: - dependency-name: github/issue-labeler dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * remove quotes from around modlist --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lgsm/config-default/config-lgsm/arma3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index f89b751ed8..f50bf83421 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -32,7 +32,7 @@ servermods="" bepath="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod='${mods}' -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" #### LinuxGSM Settings #### From 8bc716b456ca34903979d55bf4999583d09c855f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 11:42:52 +0000 Subject: [PATCH 07/28] fix(ark): remove -log parameter as deprecated --- lgsm/config-default/config-lgsm/arkserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index 123749452b..73b251731f 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -18,7 +18,7 @@ altsavedirectoryname="${defaultmap}" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters ## Game Server Docs | https://ark.wiki.gg/wiki/Server_configuration -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip} -log" +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname} -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -AutoManagedMods -Crossplay -PublicIPForEpic=${publicip}" #### LinuxGSM Settings #### From c7aedf5a7782050a2c8124f03292683488085105 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 15:16:35 +0000 Subject: [PATCH 08/28] fix(rust): add default-terminal setting for Oxide (#4383) * fix(rust): add default-terminal setting for Oxide This commit fixes issue #4268 by adding the line "set -g default-terminal "screen-256color"" to the ~/.tmux.conf file. This ensures compatibility with tmux version 3.3 or higher when running RustDedicated servers with Oxide.Rust.dll. * add gamelog to start parameters --- .../config-lgsm/rustserver/_default.cfg | 3 ++- lgsm/modules/fix_rust.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index e045777921..2652bc5970 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -28,7 +28,7 @@ saveinterval="300" # Auto-save in seconds. tickrate="30" # default: 30, range: 15-100. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" +startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.queryport ${queryport} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelog}" #### LinuxGSM Settings #### @@ -184,6 +184,7 @@ backupdir="${lgsmdir}/backup" gamelogdir="${logdir}/server" lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" lgsmlog="${lgsmlogdir}/${selfname}-script.log" consolelog="${consolelogdir}/${selfname}-console.log" alertlog="${lgsmlogdir}/${selfname}-alert.log" diff --git a/lgsm/modules/fix_rust.sh b/lgsm/modules/fix_rust.sh index 6d4cebc01c..809b5b1df0 100644 --- a/lgsm/modules/fix_rust.sh +++ b/lgsm/modules/fix_rust.sh @@ -30,3 +30,21 @@ if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then # shellcheck source=/dev/null source "${serverfiles}/carbon/tools/environment.sh" fi + +# fix for #4268 +# insert set -g default-terminal "screen-256color" into ~/.tmux.conf +if [ -f "${serverfiles}/RustDedicated_Data/Managed/Oxide.Rust.dll" ]; then + # tmux version is 3.3 or higher + tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" + if [ "${tmuxvdigit}" -ge "33" ]; then + if [ ! -f "${HOME}/.tmux.conf" ]; then + touch "${HOME}/.tmux.conf" + fi + if ! grep -q "set -g default-terminal \"screen-256color\"" "${HOME}/.tmux.conf"; then + fixname="tmux screen-256color" + fn_fix_msg_start + echo "set -g default-terminal \"screen-256color\"" >> "${HOME}/.tmux.conf" + fn_fix_msg_end + fi + fi +fi From 2122a6b390b44c7cbacb3fa1fbcf3548b644eefd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 22 Nov 2023 15:16:59 +0000 Subject: [PATCH 09/28] feat(backup): add tmpdir to backup exclusion (#4386) --- lgsm/modules/command_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh index 55981e19e5..e0ef3f0a14 100644 --- a/lgsm/modules/command_backup.sh +++ b/lgsm/modules/command_backup.sh @@ -126,7 +126,7 @@ fn_backup_compression() { core_exit.sh fi - tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" ./. + tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./. local exitcode=$? if [ "${exitcode}" != 0 ]; then fn_print_fail_eol From dea17e9d9ade814a2f963cec49411685eeb53fc0 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Nov 2023 12:39:52 +0000 Subject: [PATCH 10/28] feat: add port command for DayZ server This commit adds a new port command for the DayZ server in the info_messages.sh file. The port command is used to retrieve information about the DayZ server's ports using the "enfMain" keyword. --- lgsm/modules/info_messages.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index abddf9fc6c..59d876fccc 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -692,6 +692,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep AvorionServer" elif [ "${shortname}" == "bf1942" ]; then portcommand="ss -tuplwn | grep bf1942_lnxded" + elif [ "${shortname}" == "dayz" ]; then + portcommand="ss -tuplwn | grep enfMain" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then From e78a9dfbd79e122d5fda08a79d1a44184d08fd8a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 24 Nov 2023 13:04:59 +0000 Subject: [PATCH 11/28] feat(dayz): enable Steam master server Enables the Steam master server in the default configuration file for DayZ servers. --- lgsm/config-default/config-lgsm/dayzserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg index ed9e8783c1..0d5bf5e3e4 100644 --- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg @@ -128,7 +128,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill From ef3114b5c083e5e444ebc177736c4a4ad20c1ea8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 01:18:33 +0000 Subject: [PATCH 12/28] fix(nmrih): add if statements for symlink fixes This commit fixes an issue where certain server files were missing. Symbolic links are now created for the following files if they do not already exist: vphysics.so, studiorender.so, soundemittersystem.so, shaderapiempty.so, scenefilecache.so, replay.so, and materialsystem.so. --- lgsm/modules/fix_nmrih.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh index 83a5ad4120..dfbb76d92b 100644 --- a/lgsm/modules/fix_nmrih.sh +++ b/lgsm/modules/fix_nmrih.sh @@ -8,10 +8,24 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then + ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +fi +if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then + ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +fi +if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then + ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +fi +if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then + ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +fi +if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then + ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +fi +if [ ! -f "${serverfiles}/bin/replay.so" ]; then + ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +fi +if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then + ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +fi From 6f811a5a19005b187fd7f7cc935c4a7bc7ab7215 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 21:19:23 +0000 Subject: [PATCH 13/28] fix: only run extra steamcmd command if using GitHub Actions --- lgsm/modules/core_steamcmd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index e628e44b92..326fecf70d 100644 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -179,7 +179,9 @@ fn_update_steamcmd_remotebuild() { fi # added as was failing GitHub Actions test. Running SteamCMD twice seems to fix it. - ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1 + if [ "${CI}" ]; then + ${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +quit > /dev/null 2>&1 + fi # password for branch not needed to check the buildid remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') From 433444a1e7a5ea7baf4bd8023b80fdb4623d93d1 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 21:19:44 +0000 Subject: [PATCH 14/28] fix: word change --- lgsm/modules/core_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh index 1003839eaf..685e1ce8b0 100644 --- a/lgsm/modules/core_getopt.sh +++ b/lgsm/modules/core_getopt.sh @@ -22,7 +22,7 @@ cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "command_update_linuxgsm cmd_test_alert=("ta;test-alert" "command_test_alert.sh" "Send a test alert.") cmd_monitor=("m;monitor" "command_monitor.sh" "Check server status and restart if crashed.") cmd_skeleton=("sk;skeleton" "command_skeleton.sh" "Create a skeleton directory.") -cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Donation options.") +cmd_sponsor=("s;sponsor" "command_sponsor.sh" "Sponsorship options.") cmd_send=("sd;send" "command_send.sh" "Send command to game server console.") # Console servers only. cmd_console=("c;console" "command_console.sh" "Access server console.") From 9598fccdbd700426809a1bb9a02f8d7201c7aac4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 22:00:06 +0000 Subject: [PATCH 15/28] fix(install): non-free is now correctly detected (#4390) Debian has added non-free-firmware repo. This was being detected alongside non-free and causing issues with steamcmd installation. this fix ensures non-free is only detected. --- lgsm/modules/check_deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index b7b9f4758c..f92a608400 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -252,7 +252,7 @@ fn_deps_detector() { elif [ "${deptocheck}" == "steamcmd" ] && [ -z "${appid}" ]; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 - elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then + elif [ "${deptocheck}" == "steamcmd" ] && [ "${distroid}" == "debian" ] && ! grep -qE '[^deb]+non-free([^-]|$)' /etc/apt/sources.list; then array_deps_required=("${array_deps_required[@]/steamcmd/}") steamcmdstatus=1 # Java: Added for users using Oracle JRE to bypass check. From 3ebc5febbfeb156eded4f02e0ed9e37b05bf6fcb Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 23:25:11 +0000 Subject: [PATCH 16/28] fix(kf): ensure newer steamclient.so is copied to serverfiles (#4391) * master server true * move samp fix to pre start * bug * fix(kf): ensure newer steamclient.so is copied to serverfiles will allow KF Server to how in steam game server list --- .../config-lgsm/kfserver/_default.cfg | 2 +- lgsm/modules/fix.sh | 4 +- lgsm/modules/fix_armar.sh | 2 +- lgsm/modules/fix_kf.sh | 129 ++++++++++++++---- 4 files changed, 109 insertions(+), 28 deletions(-) diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 4aa1288304..969c5c65c5 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -121,7 +121,7 @@ steamcmdforcewindows="no" branch="" betapassword="" # Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" +steammaster="true" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh index 2f8b5442a7..2801127280 100644 --- a/lgsm/modules/fix.sh +++ b/lgsm/modules/fix.sh @@ -52,8 +52,8 @@ fn_apply_fix() { fi } -apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) -apply_post_install_fix=(av kf kf2 ro samp ut2k4 ut ut3) +apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr rust rw samp sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr) +apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3) # validate registered fixes for safe development for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do diff --git a/lgsm/modules/fix_armar.sh b/lgsm/modules/fix_armar.sh index 6b68c2a630..ae2c08f339 100755 --- a/lgsm/modules/fix_armar.sh +++ b/lgsm/modules/fix_armar.sh @@ -5,7 +5,7 @@ # Website: https://linuxgsm.com # Description: Resolves issues with Arma Reforger. -module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: Profile directory doesn't exist. # Issue Link: https://feedback.bistudio.com/T164845 diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh index 1bec47a4b7..e38b5883a5 100644 --- a/lgsm/modules/fix_kf.sh +++ b/lgsm/modules/fix_kf.sh @@ -7,30 +7,111 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -echo -e "applying WebAdmin ROOst.css fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" +# echo -e "applying WebAdmin ROOst.css fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13" sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css" -fn_sleep_time -echo -e "applying WebAdmin CharSet fix." -echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" +# echo -e "applying WebAdmin CharSet fix." +# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1" sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int" -fn_sleep_time -echo -e "applying server name fix." -fn_sleep_time -echo -e "forcing server restart..." -fn_sleep_time -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset -exitbypass=1 -command_start.sh -fn_firstcommand_reset -fn_sleep_time_5 -exitbypass=1 -command_stop.sh -fn_firstcommand_reset + +# get md5sum of steamclient.so +if [ -f "${serverfiles}/System/steamclient.so" ]; then + steamclientmd5=$(md5sum "${serverfiles}/System/steamclient.so" | awk '{print $1;}') +fi +#get md5sum of libtier0_s.so +if [ -f "${serverfiles}/System/libtier0_s.so" ]; then + libtier0_smd5=$(md5sum "${serverfiles}/System/libtier0_s.so" | awk '{print $1;}') +fi +#get md5sum of libvstdlib_s.so +if [ -f "${serverfiles}/System/libvstdlib_s.so" ]; then + libvstdlib_smd5=$(md5sum "${serverfiles}/System/libvstdlib_s.so" | awk '{print $1;}') +fi + +# get md5sum of steamclient.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${steamcmddir}/linux32/steamclient.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + steamcmdsteamclientmd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}') +fi + +# get md5sum of libtier0_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${steamcmddir}/linux32/libtier0_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + steamcmdlibtier0_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}') +fi + +# get md5sum of libvstdlib_s.so from steamcmd +if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${steamcmddir}/linux32/libvstdlib_s.so" | awk '{print $1;}') +elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}') +fi + +if [ ! -f "${serverfiles}/System/steamclient.so" ] || [ "${steamcmdsteamclientmd5}" != "${steamclientmd5}" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/System/libtier0_s.so" ] || [ "${steamcmdlibtier0_smd5}" != "${libtier0_smd5}" ]; then + fixname="libtier0_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then + cp "${steamcmddir}/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so" + fi + fn_fix_msg_end +fi + +if [ ! -f "${serverfiles}/System/libvstdlib_s.so" ] || [ "${steamcmdlibvstdlib_smd5}" != "${libvstdlib_smd5}" ]; then + fixname="libvstdlib_s.so" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then + cp "${steamcmddir}/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then + cp "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so" + fi + fn_fix_msg_end +fi + +# if running install command +if [ "${commandname}" == "INSTALL" ]; then + echo -e "applying server name fix." + fn_sleep_time + echo -e "forcing server restart..." + fn_sleep_time + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fn_sleep_time_5 + exitbypass=1 + command_stop.sh + fn_firstcommand_reset +fi From b59eeecb54a21f4db18e5fa4a90bf3ca54f0362a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 26 Nov 2023 23:44:06 +0000 Subject: [PATCH 17/28] feat(ns2): update start parameters to add mod server (#4396) also removed mod2 as no longer required as per NS2 dedi server docs --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 7 ++++--- lgsm/modules/info_game.sh | 7 ++++--- lgsm/modules/info_messages.sh | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 8cca4da815..c7c09c47dc 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -13,18 +13,19 @@ ip="0.0.0.0" port="27015" defaultmap="ns2_summit" maxplayers="24" +maxspectators="0" servername="LinuxGSM" httpuser="admin" httppassword="admin" httpport="8080" -mods="" +modserverport="27031" serverpassword="" # Add the following line to the parms if you want a private server. Ensuring # that the password variable above is not left empty. -# -password \"${serverpassword}\" +# -password '${serverpassword}' ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\"" +startparameters="-name '${servername}' -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword '${httppassword}' -webport ${httpport} -startmodserver -modserverport ${modserverport} -map ${defaultmap} -limit ${maxplayers} -speclimit ${maxspectators} -config_path '${servercfgdir}' -logdir '${gamelogdir}' -modstorage '${modstoragedir}'" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 0365660a6f..9f6bb73708 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2033,14 +2033,15 @@ fn_info_game_source() { fn_info_game_spark() { defaultmap="${defaultmap:-"NOT SET"}" + httppassword="${httppassword:-"NOT SET"}" + httpport="${httpport:-"0"}" + httpuser="${httpuser:-"NOT SET"}" maxplayers="${maxplayers:-"0"}" + modserverport=${modserverport:-"0"} port="${port:-"0"}" queryport="$((port + 1))" servername="${servername:-"NOT SET"}" serverpassword="${serverpassword:-"NOT SET"}" - httpuser="${httpuser:-"NOT SET"}" - httppassword="${httppassword:-"NOT SET"}" - httpport="${httpport:-"0"}" } # Config Type: Custom (key-value pairs) diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 59d876fccc..09dd4c2ad9 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -1468,6 +1468,7 @@ fn_info_messages_spark() { fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp + fn_port "Mod Server" modserverport tcp fn_port "Web Interface" httpport tcp } | column -s $'\t' -t echo -e "" From 3961a22430308891a330f44938f353d5586117ec Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Nov 2023 00:03:23 +0000 Subject: [PATCH 18/28] fix(q3): mapcycle now working correctly #3749 --- lgsm/config-default/config-lgsm/q3server/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 534bf24297..0a54d2852b 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -14,7 +14,7 @@ port="27960" defaultmap="q3dm17" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### From ddb61478f18dfdeb7a4bc7d0a8ee97232cd1e513 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 27 Nov 2023 14:14:32 +0000 Subject: [PATCH 19/28] fix: move exec to end of parameters idtech --- lgsm/config-default/config-lgsm/cod2server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/cod4server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/codserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/coduoserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/codwawserver/_default.cfg | 2 +- lgsm/config-default/config-lgsm/jk2server/_default.cfg | 2 +- lgsm/config-default/config-lgsm/mohaaserver/_default.cfg | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 95b76ae1ea..98ea0afb7b 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_leningrad" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index a93237894d..cde7e01135 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_crossfire" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 6263d79b6b..1c0a0902c4 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_neuville" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index b7c6036b97..b3f89889f5 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_cassino" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 0820475f1e..e906fcf071 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="mp_castle" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index 4d49e4e7e8..d14b052c28 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -18,7 +18,7 @@ port="27960" defaultmap="ffa_bespin" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg}" #### LinuxGSM Settings #### diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index a457832cf1..a53e55bfce 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -14,7 +14,7 @@ port="12203" defaultmap="dm/mohdm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +map ${defaultmap} +exec ${servercfg} " #### LinuxGSM Settings #### From 366701fe361b4869f14c7664cec373ed4ddf8eaf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Nov 2023 22:54:32 +0000 Subject: [PATCH 20/28] fix(ns2): adjusted player numbers for ranked --- lgsm/config-default/config-lgsm/ns2server/_default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index c7c09c47dc..32d0bcb205 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -12,8 +12,8 @@ ip="0.0.0.0" port="27015" defaultmap="ns2_summit" -maxplayers="24" -maxspectators="0" +maxplayers="20" +maxspectators="5" servername="LinuxGSM" httpuser="admin" httppassword="admin" From 6a56a18b1ff370292a33e82faaabe3532705b15e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 29 Nov 2023 23:01:59 +0000 Subject: [PATCH 21/28] feat: added more checks for insecure passwords --- .../config-lgsm/inssserver/_default.cfg | 2 +- .../config-lgsm/ns2cserver/_default.cfg | 2 +- .../config-default/config-lgsm/ns2server/_default.cfg | 2 +- .../config-lgsm/wurmserver/_default.cfg | 2 +- lgsm/modules/check_config.sh | 11 +++++++++-- lgsm/modules/info_game.sh | 9 +-------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 8d14e79ea0..d4d485d68f 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -13,7 +13,7 @@ ip="0.0.0.0" port="27102" queryport="27131" rconport="27015" -rconpassword="" +rconpassword="CHANGE_ME" servername="LinuxGSM" defaultmap="Oilfield" defaultscenario="Scenario_Refinery_Push_Security" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index fb4686c1e4..b285d8cb0f 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -15,7 +15,7 @@ defaultmap="co_core" maxplayers="24" servername="LinuxGSM" httpuser="admin" -httppassword="admin" +httppassword="CHANGE_ME" httpport="8080" mods="" serverpassword="" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index 32d0bcb205..41970a2f44 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -16,7 +16,7 @@ maxplayers="20" maxspectators="5" servername="LinuxGSM" httpuser="admin" -httppassword="admin" +httppassword="CHANGE_ME" httpport="8080" modserverport="27031" serverpassword="" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index b27783cf4b..901417aafd 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -27,7 +27,7 @@ homekingdom="4" # Unlocks the admin commands from within the game, that can be used to change # the gameplay settings of the server, such as skill gain rate and field growth time. -adminpassword="ADMINPASSWORD" +adminpassword="CHANGE_ME" # If true the server will follow the rules from the Epic servers in Wurm Online. # For instance it will use the skill curve. diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh index 42892a1911..d8bfb50082 100644 --- a/lgsm/modules/check_config.sh +++ b/lgsm/modules/check_config.sh @@ -19,8 +19,15 @@ if [ "${shortname}" == "rust" ] && [ -v rconpassword ] && [ -z "${rconpassword}" fn_print_fail_nl "RCON password is not set" fn_script_log_warn "RCON password is not set" elif [ -v rconpassword ] && [ "${rconpassword}" == "CHANGE_ME" ]; then - fn_print_warn_nl "Default RCON Password detected" - fn_script_log_warn "Default RCON Password detected" + fn_print_warn_nl "Default RCON password detected" + fn_script_log_warn "Default RCON password detected" +elif [ -v httppassword ] && [ "${httppassword}" == "CHANGE_ME" ]; then + fn_print_warn_nl "Default Web password detected" + fn_script_log_warn "Default Web password detected" +elif [ -v adminpassword ] && [ "${adminpassword}" == "CHANGE_ME" ]; then + fn_print_warn_nl "Default Admin password detected" + fn_script_log_warn "Default Admin password detected" + fi if [ "${shortname}" == "vh" ] && [ -z "${serverpassword}" ]; then diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 9f6bb73708..cfa0a5c05c 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1832,14 +1832,7 @@ fn_info_game_rw() { # example: hostname "SERVERNAME" # filetypes: cfg fn_info_game_samp() { - # Config - if [ ! -f "${servercfgfullpath}" ]; then - servername="unnamed server" - rconpassword="${unavailable}" - port="7777" - rconport="${port}" - maxplayers="50" - else + if [ -f "${servercfgfullpath}" ]; then servername=$(grep "hostname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/hostname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') port=$(grep "port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') From ef6410efec1ffe2199bde982f7aea9d14da9338d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:00:29 +0000 Subject: [PATCH 22/28] feat: deprecate crafting dead --- .../config-lgsm/cdserver/_default.cfg | 178 ------------------ lgsm/data/serverlist.csv | 1 - lgsm/modules/info_messages.sh | 4 +- lgsm/modules/install_config.sh | 6 - 4 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 lgsm/config-default/config-lgsm/cdserver/_default.cfg diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg deleted file mode 100644 index 28deeb6e60..0000000000 --- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg +++ /dev/null @@ -1,178 +0,0 @@ -################################## -######## Default Settings ######## -################################## -# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! -# Copy settings from here and use them in either: -# common.cfg - applies settings to every instance. -# [instance].cfg - applies settings to a specific instance. - -#### Game Server Settings #### - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode -nographics" - -#### LinuxGSM Settings #### - -## LinuxGSM Stats -# Send useful stats to LinuxGSM developers. -# https://docs.linuxgsm.com/configuration/linuxgsm-stats -# (on|off) -stats="off" - -## Notification Alerts -# (on|off) - -# Display IP | https://docs.linuxgsm.com/alerts#display-ip -displayip="" - -# More info | https://docs.linuxgsm.com/alerts#more-info -postalert="off" - -# Alert on Start/Stop/Restart -statusalert="off" - -# Discord Alerts | https://docs.linuxgsm.com/alerts/discord -discordalert="off" -discordwebhook="webhook" - -# Email Alerts | https://docs.linuxgsm.com/alerts/email -emailalert="off" -email="email@example.com" -emailfrom="" - -# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify -gotifyalert="off" -gotifytoken="token" -gotifywebhook="webhook" - -# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt -iftttalert="off" -ifttttoken="accesstoken" -iftttevent="linuxgsm_alert" - -# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet -pushbulletalert="off" -pushbullettoken="accesstoken" -channeltag="" - -# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover -pushoveralert="off" -pushovertoken="accesstoken" -pushoveruserkey="userkey" - -# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat -rocketchatalert="off" -rocketchatwebhook="webhook" - -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - -# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram -# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". -# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". -telegramapi="api.telegram.org" -telegramalert="off" -telegramtoken="accesstoken" -telegramchatid="" -curlcustomstring="" - -## Updating | https://docs.linuxgsm.com/commands/update -updateonstart="off" - -## Backup | https://docs.linuxgsm.com/commands/backup -maxbackups="4" -maxbackupdays="30" -stoponbackup="on" - -## Logging | https://docs.linuxgsm.com/features/logging -consolelogging="on" -logdays="7" - -## Monitor | https://docs.linuxgsm.com/commands/monitor -# Query delay time -querydelay="1" - -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" - -#### Advanced Settings #### - -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time -sleeptime="0.5" - -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="685100" -steamcmdforcewindows="no" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="false" - -## Stop Mode | https://docs.linuxgsm.com/features/stop-mode -# 1: tmux kill -# 2: CTRL+c -# 3: quit -# 4: quit 120s -# 5: stop -# 6: q -# 7: exit -# 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end -stopmode="2" - -## Query mode -# 1: session only -# 2: gamedig (gsquery fallback) -# 3: gamedig -# 4: gsquery -# 5: tcp -querymode="1" -querytype="" - -## Console type -consoleverbose="yes" -consoleinteract="no" - -## Game Server Details -# Do not edit -gamename="Crafting Dead" -engine="unity3d" -glibc="2.15" - -#### Directories #### -# Edit with care - -## Game Server Directories -systemdir="${serverfiles}" -executabledir="${serverfiles}" -executable="./crafting_dead.x86_64" -servercfgdir="${systemdir}" -servercfg="properties.json" -servercfgdefault="properties.json" -servercfgfullpath="${servercfgdir}/${servercfg}" - -## Backup Directory -backupdir="${lgsmdir}/backup" - -## Logging Directories -[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" -gamelogdir="${systemdir}/logs" -lgsmlogdir="${logdir}/script" -consolelogdir="${logdir}/console" -lgsmlog="${lgsmlogdir}/${selfname}-script.log" -consolelog="${consolelogdir}/${selfname}-console.log" -alertlog="${lgsmlogdir}/${selfname}-alert.log" -postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" - -## Logs Naming -lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" -consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" - -## Log Parameters -logtimestamp="off" -logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 1dd6dda2cd..20ea2e6c7c 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -18,7 +18,6 @@ bs,bsserver,Blade Symphony,ubuntu-22.04 bt,btserver,Barotrauma,ubuntu-22.04 btl,btlserver,BATTALION: Legacy,ubuntu-20.04 cc,ccserver,Codename CURE,ubuntu-22.04 -cd,cdserver,Crafting Dead,ubuntu-22.04 ck,ckserver,Core Keeper,ubuntu-22.04 cmw,cmwserver,Chivalry: Medieval Warfare,ubuntu-22.04 cod,codserver,Call of Duty,ubuntu-22.04 diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index 09dd4c2ad9..fe019da44b 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -663,7 +663,7 @@ fn_info_messages_ports_edit() { startparameterslocation="${red}UNKNOWN${default}" # engines/games that require editing in the config file. - local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "cd" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") + local ports_edit_array=("ac" "arma3" "armar" "bo" "bt" "ct" "dst" "eco" "idtech2" "idtech3" "idtech3_ql" "jc2" "jc3" "lwjgl2" "mcb" "nec" "pc" "pc2" "prism3d" "pz" "qw" "refractor" "renderware" "rw" "sb" "sdtd" "st" "stn" "ts3" "tw" "terraria" "unreal" "unreal2" "unreal3" "vints" "wurm") for port_edit in "${ports_edit_array[@]}"; do if [ "${shortname}" == "ut3" ]; then startparameterslocation="${servercfgdir}/UTWeb.ini" @@ -1708,8 +1708,6 @@ fn_info_messages_select_engine() { fn_info_messages_bt elif [ "${shortname}" == "btl" ]; then fn_info_messages_btl - elif [ "${shortname}" == "cd" ]; then - fn_info_messages_cd elif [ "${shortname}" == "ck" ]; then fn_info_messages_ck elif [ "${shortname}" == "cs2" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 45773f63c7..0e688b65db 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -286,12 +286,6 @@ elif [ "${shortname}" == "bmdm" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "cd" ]; then - array_configs+=(properties.json) - fn_fetch_default_config - fn_default_config_remote - fn_set_config_vars - fn_list_config_locations elif [ "${shortname}" == "ck" ]; then array_configs+=(ServerConfig.json) fn_fetch_default_config From 746c413314c3ab1790c42623c542919b388c2707 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:01:00 +0000 Subject: [PATCH 23/28] feat(ns2c): tidy parameters --- lgsm/config-default/config-lgsm/ns2cserver/_default.cfg | 2 +- lgsm/modules/info_game.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index b285d8cb0f..5fa692c084 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -24,7 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" +startparameters="-name '${servername}' -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword '${httppassword}' -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path '${servercfgdir}' -modstorage '${modstoragedir}' -mods '${mods}'" #### LinuxGSM Settings #### diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index cfa0a5c05c..d225707167 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -2268,8 +2268,6 @@ elif [ "${shortname}" == "bt" ]; then fn_info_game_bt elif [ "${shortname}" == "btl" ]; then fn_info_game_btl -elif [ "${shortname}" == "cd" ]; then - fn_info_game_cd elif [ "${shortname}" == "ck" ]; then fn_info_game_ck elif [ "${shortname}" == "cmw" ]; then From 38079bac8418ae9c5b4bd20b62fac32a9e4daccc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 30 Nov 2023 21:21:11 +0000 Subject: [PATCH 24/28] feat(new server): Quake 4 (#4398) --- .../config-lgsm/q4server/_default.cfg | 186 ++++++++++++++++++ lgsm/data/almalinux-8.csv | 1 + lgsm/data/almalinux-9.csv | 1 + lgsm/data/centos-7.csv | 1 + lgsm/data/centos-8.csv | 1 + lgsm/data/centos-9.csv | 1 + lgsm/data/debian-10.csv | 1 + lgsm/data/debian-11.csv | 1 + lgsm/data/debian-12.csv | 1 + lgsm/data/debian-9.csv | 1 + lgsm/data/gameicons/q4-icon.png | Bin 0 -> 786 bytes lgsm/data/rhel-7.csv | 1 + lgsm/data/rhel-8.csv | 1 + lgsm/data/rhel-9.csv | 1 + lgsm/data/rocky-8.csv | 1 + lgsm/data/rocky-9.csv | 1 + lgsm/data/serverlist.csv | 1 + lgsm/data/ubuntu-16.04.csv | 1 + lgsm/data/ubuntu-18.04.csv | 1 + lgsm/data/ubuntu-20.04.csv | 1 + lgsm/data/ubuntu-22.04.csv | 1 + lgsm/data/ubuntu-23.04.csv | 1 + lgsm/data/ubuntu-23.10.csv | 1 + lgsm/modules/info_game.sh | 21 ++ lgsm/modules/info_messages.sh | 14 ++ lgsm/modules/install_config.sh | 6 + lgsm/modules/install_server_files.sh | 9 +- 27 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 lgsm/config-default/config-lgsm/q4server/_default.cfg create mode 100644 lgsm/data/gameicons/q4-icon.png diff --git a/lgsm/config-default/config-lgsm/q4server/_default.cfg b/lgsm/config-default/config-lgsm/q4server/_default.cfg new file mode 100644 index 0000000000..ffd311e3ce --- /dev/null +++ b/lgsm/config-default/config-lgsm/q4server/_default.cfg @@ -0,0 +1,186 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### 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 +port="28004" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_port ${port} +exec ${servercfg}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="2210" +steamcmdforcewindows="yes" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="quake4" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Quake 4" +engine="idtech3_ql" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./quake4-dedicated" +servercfgdir="${systemdir}/q4base" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${logdir}/server" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 561b3c134c..6427b1460b 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 64a9e06456..2b6ea075d1 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index a1b10095e9..2c876efc2e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 561b3c134c..6427b1460b 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 64a9e06456..2b6ea075d1 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index c890739c51..e7e81b75eb 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index c265a1f4b1..a40fd1c7b7 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 00351bde8d..5141290ff8 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 6fd3c21eec..6deebf592b 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/gameicons/q4-icon.png b/lgsm/data/gameicons/q4-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dd4c2d7fa46d79571053be5e7b7df59fa20c09c3 GIT binary patch literal 786 zcmV+t1MU2YP)8F2MF0Q*1_lcO4FCcX00RgC0s#vJ1Oov81pop700jUD82}I= z0aIouXL~(7R0kI;0Vg^G9xwwjMGjeTB12OiV01T2Tq-(F3vGftM_m&b8WeesO?;C^ zP*F<|4ij5!K7Ec>E;bwVP8=Tq00L4;L_t(I%S}_;mg_1EGsb{TLheZ~(@s18|C3uz zd)7MXOG<>0WI@k+N?C}R$6*#JDJWlt8ac60_kiIPl07QNb`hA1KP+)yB9Dhh=TX5pX2rtO`?d`6G52j` zt_{9CclEds)wV_MmVM^_m|5nnUldaWKipCIwK(k?3m!uf60f(>ihuST0VqhbzN^%T z?^R^pBTOSO`iu){V(0wY8;Z2I*0ySr3x*~hJ35dtCQx^EgveMcyFN(sM$xAghz#dT zcZm;>`NVv3;^e27gc5k>o`dA{t%0x8*)g1lK&>bkemEs?gTd%Cix0%BQmg`CUa93$8N7F%J8 z9A@&jVMh6+CwG$RuI}+mh|c|q+W*eD)AOD~2sumkQ3c$7TmbVmEav<3A1ulqYgKzI Q5dZ)H07*qoM6N<$f}~SJ*8l(j literal 0 HcmV?d00001 diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 8a748cda70..3739922425 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 561b3c134c..6427b1460b 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 64a9e06456..2b6ea075d1 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 561b3c134c..6427b1460b 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 64a9e06456..2b6ea075d1 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -89,6 +89,7 @@ pvr,libcxx pz,java-11-openjdk rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 20ea2e6c7c..16c1e812ff 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -87,6 +87,7 @@ pvr,pvrserver,Pavlov VR,ubuntu-22.04 pz,pzserver,Project Zomboid,ubuntu-22.04 q2,q2server,Quake 2,ubuntu-22.04 q3,q3server,Quake 3: Arena,ubuntu-22.04 +q4,q4server,Quake 4,ubuntu-22.04 ql,qlserver,Quake Live,ubuntu-22.04 qw,qwserver,Quake World,ubuntu-22.04 ricochet,ricochetserver,Ricochet,ubuntu-22.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index e91bec26d2..b2c62f49f7 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-8-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index c890739c51..e7e81b75eb 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-11-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index e66eb7dc62..e751ad7e3a 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index ffc637ab73..dfbe3f3e4d 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 65e17bf1be..24b6ef39e9 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 65e17bf1be..24b6ef39e9 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -89,6 +89,7 @@ pvr,libc++1 pz,openjdk-17-jre,rng-tools5 q2 q3 +q4 ql qw ricochet diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d225707167..81767408d4 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -1685,6 +1685,25 @@ fn_info_game_q3() { defaultmap="${defaultmap:-"NOT SET"}" } +# Config Type: QuakeC +# Comment: // or /* */ +# fn_info_game_quakec "SERVERNAME" +# Filetype: cfg +fn_info_game_q4() { + if [ -f "${servercfgfullpath}" ]; then + fn_info_game_quakec "maxplayers" "sv_maxclients" + fn_info_game_quakec "rconpassword" "net_serverRemoteConsolePassword" + fn_info_game_quakec "servername" "si_name" + fn_info_game_quakec "serverpassword" "g_password" + fi + maxplayers="${maxplayers:-"0"}" + rconpassword="${rconpassword:-"NOT SET"}" + servername="${servername:-"NOT SET"}" + port="${port:-"0"}" + queryport="${port}" + defaultmap="${defaultmap:-"NOT SET"}" +} + # Config Type: QuakeC # Comment: // or /* */ # Example: set sv_hostname "SERVERNAME" @@ -2346,6 +2365,8 @@ elif [ "${shortname}" == "q2" ]; then fn_info_game_q2 elif [ "${shortname}" == "q3" ]; then fn_info_game_q3 +elif [ "${shortname}" == "q4" ]; then + fn_info_game_q4 elif [ "${shortname}" == "ql" ]; then fn_info_game_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh index fe019da44b..1e3bfad4b3 100644 --- a/lgsm/modules/info_messages.sh +++ b/lgsm/modules/info_messages.sh @@ -694,6 +694,8 @@ fn_info_messages_ports() { portcommand="ss -tuplwn | grep bf1942_lnxded" elif [ "${shortname}" == "dayz" ]; then portcommand="ss -tuplwn | grep enfMain" + elif [ "${shortname}" == "q4" ]; then + portcommand="ss -tuplwn | grep q4ded.x86" elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then portcommand="ss -tuplwn | grep java" elif [ "${shortname}" == "terraria" ]; then @@ -1286,6 +1288,7 @@ fn_info_messages_q2() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1293,6 +1296,15 @@ fn_info_messages_q3() { { fn_port "header" fn_port "Game" port udp + fn_port "Query" queryport udp + } | column -s $'\t' -t +} + +fn_info_messages_q4() { + { + fn_port "header" + fn_port "Game" port udp + fn_port "Query" queryport udp } | column -s $'\t' -t } @@ -1792,6 +1804,8 @@ fn_info_messages_select_engine() { fn_info_messages_q2 elif [ "${shortname}" == "q3" ]; then fn_info_messages_q3 + elif [ "${shortname}" == "q4" ]; then + fn_info_messages_q3 elif [ "${shortname}" == "ql" ]; then fn_info_messages_ql elif [ "${shortname}" == "qw" ]; then diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 0e688b65db..a163243dc7 100644 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -634,6 +634,12 @@ elif [ "${shortname}" == "q2" ]; then fn_set_config_vars fn_list_config_locations elif [ "${shortname}" == "q3" ]; then + array_configs+=(server.cfg) + fn_fetch_default_configs + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations +elif [ "${shortname}" == "q4" ]; then array_configs+=(server.cfg) fn_fetch_default_config fn_default_config_remote diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 2763f470bc..c5fe822add 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -106,6 +106,13 @@ fn_install_server_files() { chmodx="nochmodx" run="norun" force="noforce" md5="b0e26d8919fe9313fb9d8ded2360f3db" + elif [ "${shortname}" == "q4" ]; then + remote_fileurl="http://linuxgsm.download/Quake4/quake4-1.4.2-x86-linuxded.tar.xz" + local_filedir="${tmpdir}" + local_filename="quake4-1.4.2-x86-linuxded.tar.xz" + chmodx="nochmodx" run="norun" + force="noforce" + md5="afe30b44f23c8ae2ce6f0f464473d8ba" elif [ "${shortname}" == "qw" ]; then remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz" local_filedir="${tmpdir}" @@ -240,7 +247,7 @@ elif [ "${shortname}" == "vints" ]; then elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi From f28a4e56886504c67fc77278ec3361c70ca87021 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 00:08:53 +0000 Subject: [PATCH 25/28] fix(kf2): repair port parsing --- lgsm/modules/info_game.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index 81767408d4..4189496786 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -489,7 +489,7 @@ fn_info_game_kf() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httppassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpuser" "AdminName" fn_info_game_ini "lanport" "LANServerPort" @@ -525,11 +525,11 @@ fn_info_game_kf2() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" "${servercfgdir}/KFWeb.ini" - fn_info_game_ini "port" "Port" + fn_info_game_ini "port" "Port" "${servercfgdir}/LinuxServer-KFEngine.ini" fn_info_game_ini "servername" "ServerName" fn_info_game_ini "serverpassword" "GamePassword" - fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httpenabled" "bEnabled" "${servercfgdir}/KFWeb.ini" + fn_info_game_ini "httppassword" "AdminPassword" fi adminpassword="${adminpassword:-"NOT SET"}" defaultmap="${defaultmap:-"NOT SET"}" @@ -1751,7 +1751,7 @@ fn_info_game_ro() { if [ -f "${servercfgfullpath}" ]; then fn_info_game_ini "adminpassword" "AdminPassword" fn_info_game_ini "httpenabled" "bEnabled" - fn_info_game_ini "httppassword" "httppasswordword" + fn_info_game_ini "httppassword" "AdminPassword" fn_info_game_ini "httpport" "ListenPort" fn_info_game_ini "httpuser" "AdminName" fn_info_game_ini "lanport" "LANServerPort" From 5685ece4bc3dd2a1104388fd0fcf1388b636a219 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 19:56:54 +0000 Subject: [PATCH 26/28] deprecate cd --- lgsm/data/almalinux-8.csv | 1 - lgsm/data/almalinux-9.csv | 1 - lgsm/data/centos-7.csv | 1 - lgsm/data/centos-8.csv | 1 - lgsm/data/centos-9.csv | 1 - lgsm/data/debian-10.csv | 1 - lgsm/data/debian-11.csv | 1 - lgsm/data/debian-12.csv | 1 - lgsm/data/debian-9.csv | 1 - lgsm/data/gameicons/cd-icon.png | Bin 2819 -> 0 bytes lgsm/data/rhel-7.csv | 1 - lgsm/data/rhel-8.csv | 1 - lgsm/data/rhel-9.csv | 1 - lgsm/data/rocky-8.csv | 1 - lgsm/data/rocky-9.csv | 1 - lgsm/data/ubuntu-16.04.csv | 1 - lgsm/data/ubuntu-18.04.csv | 1 - lgsm/data/ubuntu-20.04.csv | 1 - lgsm/data/ubuntu-22.04.csv | 1 - lgsm/data/ubuntu-23.04.csv | 1 - lgsm/data/ubuntu-23.10.csv | 1 - 21 files changed, 20 deletions(-) delete mode 100644 lgsm/data/gameicons/cd-icon.png diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 6427b1460b..dcfb145286 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 2b6ea075d1..bcd93857b8 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 2c876efc2e..10500627ea 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index 6427b1460b..dcfb145286 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 2b6ea075d1..bcd93857b8 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index e7e81b75eb..b2c646f9ff 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index a40fd1c7b7..70f0a3fbe4 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index 5141290ff8..e3466158d0 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index 6deebf592b..303bd51dcf 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/gameicons/cd-icon.png b/lgsm/data/gameicons/cd-icon.png deleted file mode 100644 index dddd49f7c40781aa78c47fbbdb28e6d889e41c2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2819 zcmZ{kS5VW762|`!NhM52NoLIFiRrsU$|eYmr;`^|j2-_y?go?f#w<>wXU1pt5_WrnmqQR&|e zWYSm+wzZZW7AEn0t{I0_Bye zLd>R|oNb|yhBjvHoQy%a|#Gpqov=RDGR5f#Xd@nV1_QZcU`-j7KFGkeQ;(t`Tg@t*G&* zx%62-F)qFv;_tMGspgVrSB6jFT0+1oiRjvG&4(IV{^ z=b=}`8&;wVN+hc03^mp2^Xo8SuSo6HPTAe11o@bsm=86*Yy8|!ngO71Af&_fU0wX} zU3-n>Kh6zUrV^ln@lA}{XQ{V>>Yt@_aEiOsG|`^io^@cS;9za)8S$SgYV{m?LeM@FOmlwMYb?#YH{ zCJ;AT*G)bxyzb(66+mcvJA$A#kn`y|W!iaVsbhg&9r`Ohm*P}g4swK@A-tInqWw9= zIIOR;#XX>?RXjHWLMr!o>K}N{4hbmpz4A&^k$#+ZmcuVTG07-6sTjiCfyBv>JXcoTg*i06%cc!#9F87BW zwucRe?F`R2=l}7}1Ga?CDDb6QzF<}i$-jREWiKEnOyhcQ{hltSZ%v?PB2&x+n438i^~xq4^~!ZfTBWN}lS+-$-8?-nFdu+ra`HDq zH;R7z*n`jDR(GF=QVWCY9?fY%vi7D}Grhg|el?Vkl}2H@Bt89jcKTovZ>#q5%}#K# z-}sf8aBNY;Q`ghxl{`t`zI3^FQA2D+vLfOiZWJ{N{W`%@sDEPEe=xZ_k=k zj!4)LQQBljT&xgCJo;gqBiL7@wbN|&n*z^c2w%zPT#58EzLUE@?Gi52GxEm2$?1RV zCy>2Youda?dfMSo^NfZ@jiX493Y@ko8ML?bpWC$?$MX${V8*1kg)CSGt=`vB@HGmO zVC|!Dt-{8FpUR6*ho)~cye38Cb|Q~w7>nFiRvPkiRfS=67@MK=4T zrF<59WyA18r3GbN#h8P;1s=i?RZQEgsOYYsvrV!#1ANCf@Cd$gMX=YUG`eaa zR@`*?fG1LIMXt(!(lDOm>xKCFAReB9(Rq_|AaiH;Xmxw}h*XP9q8uF1{DgJEXcP4_ zSPtgQc9w&t6cDaJ2vTKlxVyU06Ui;8wTMmRk&%uP$n0X2=H+RDX%)CtJ0+S0gafU4 zO=exI+ek7+QW}X$L7utAf3Z}We$~}y=`jwQ!zUwP(zDPum|9abUQcFGit2e}^oA$O zzRRQfHh!GoAMpNq|E@Ah2&C2moX^kB>%*z=8-2rY)oJM+>@UXA>2zIu{GX}YWwO4w zoCLTD_z|S!OeM`Y#>V*J-nu@PV*B}GS08!eEIm!k9merJ&*W6cqk(rmdDa?l?`-`X zS^npOl@_@v{NxdsrO(We*pgq&X4XUImj00Y+hJ*DABjL?q~yPUK8IAxSq;Ea*4EaD zaxdMZE*4G=qsMGMy1{T&T-}R`A-{It)ZAHIU(=1myV=kRI=6}C8ln564jAE}v^NB0 znfVOF$}ShBb@t1;XT#3xstk56s`Y}ii0hTu0zbw|mw!Y3Hsg&(rRj6O#IB2%Vq3jX zp}Y3Zf_0Worv^LJ9J=3AaOE{ei&OU(tKiWZY(o(H1hx&=gMP8SCx47BxNG0Ak|S^_8B3cl4lken4XgAto5}l{)|{c83(=$WU5o*{I#7&D?TAAN0~g4^Mb;yq4^; zKRV{pIsmmuW-vT1V^z+w_R36In;RRP-pyJ85vry)JkzCqDBS*jpV`L0uiLPfs>NG_ z_aU!-K5pDz3>6=;j>%JvZ4%6)Z0ADGGbg^>Z^m^g5DJfGmpuG8Tx+!rMGUeY4bm+w z1LhS$g(Q;e z7RLL)skDW}ruRd|s}g05y-KcPOzB7aYnL3ubx|J*IguSk*Ld(Mom>$gIlkr`KHF?xREP$T*Phv zH93-M==jkeg0mg3-eRg&o@t+8BY)KJda1gCOG!z?Qs9|wI2vxyE~`Sd$)J;1g0uAO zH>TdxnNZ+mD<(VOxKmWE9DIm+$bPp8_b(MKBLYQ}>E@KAfJPRmhD-y!Dgts(fFMUQ zzCrT9lL$KQM8b&xmtmLxQh~!%;2Jh?O&yrF&R^=vFqjSuhV-i3{-1!azsK#HLH|FX Tt|?&kn>i?BOJt#uYs7y6+R9E? diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 3739922425..f0a068399d 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 6427b1460b..dcfb145286 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 2b6ea075d1..bcd93857b8 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 6427b1460b..dcfb145286 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 2b6ea075d1..bcd93857b8 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -19,7 +19,6 @@ bs bt,libicu,dos2unix,libxml2 btl cc -cd ck,xorg-x11-server-Xvfb cmw cod,compat-libstdc++-33.i686 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index b2c62f49f7..c8e10e48e2 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index e7e81b75eb..b2c646f9ff 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index e751ad7e3a..853b98f33d 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index dfbe3f3e4d..d42afde49c 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index 24b6ef39e9..ac4f05945c 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index 24b6ef39e9..ac4f05945c 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -19,7 +19,6 @@ bs bt,libicu-dev,dos2unix,libxml2-utils btl cc -cd ck,xvfb,libxi6 cmw cod,libstdc++5:i386 From cb5bca9573d6036b0c1535a01126a7333517688d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 20:17:03 +0000 Subject: [PATCH 27/28] lint --- lgsm/modules/fix_vh.sh | 10 +++++----- lgsm/modules/info_distro.sh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index ff02eaddd9..7c14554432 100644 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -18,11 +18,11 @@ if [ -f "${modsinstalledlistfullpath}" ]; then executable="./start_server_bepinex.sh" fi if [ -d "${serverfiles}/unstripped_corlib" ]; then - rm -rf "${serverfiles}/unstripped_corlib" - fi - sed -i 's/^dllSearchPathOverride=unstripped_corlib/# &/' "${serverfiles}/doorstop_config.ini" - sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/' "${serverfiles}/start_game_bepinex.sh" - sed -i 's/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/' "${serverfiles}/start_server_bepinex.sh" + rm -rf "${serverfiles}/unstripped_corlib" + fi + sed -i "s/^dllSearchPathOverride=unstripped_corlib/# &/" "${serverfiles}/doorstop_config.ini" + sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR\/unstripped_corlib"/# &/" "${serverfiles}/start_game_bepinex.sh" + sed -i "s/^export DOORSTOP_CORLIB_OVERRIDE_PATH="${VALHEIM_PLUS_PATH}\/unstripped_corlib"/# &/" "${serverfiles}/start_server_bepinex.sh" fi # special exports for BepInEx if installed if grep -qE "^bepinexvh" "${modsinstalledlistfullpath}"; then diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh index 828946139e..cb832a87b8 100644 --- a/lgsm/modules/info_distro.sh +++ b/lgsm/modules/info_distro.sh @@ -28,15 +28,15 @@ kernel="$(uname -r)" # Kernel e.g. 2.6.32-042stab120.16 distro_info_array=(os-release lsb_release hostnamectl debian_version redhat-release) for distro_info in "${distro_info_array[@]}"; do if [ -f "/etc/os-release" ] && [ "${distro_info}" == "os-release" ]; then - distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS - distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 + distroname="$(grep "PRETTY_NAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. Ubuntu 22.04.3 LTS + distroversion="$(grep "VERSION_ID" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. 22.04 # Special var for rhel like distros to remove point in number e.g 8.4 to just 8. if [[ "${distroidlike}" == *"rhel"* ]] || [ "${distroid}" == "rhel" ]; then distroversionrh="$(sed -nr 's/^VERSION_ID="([0-9]*).+?"/\1/p' /etc/os-release)" # e.g. 8 fi - distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu - distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. debian - distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F\= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy + distroid="$(grep "ID=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. ubuntu + distroidlike="$(grep "ID_LIKE=" /etc/os-release | grep -v _ID | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. debian + distrocodename="$(grep "VERSION_CODENAME" /etc/os-release | awk -F= '{gsub(/"/,"",$2);print $2}')" # e.g. jammy elif [ "$(command -v lsb_release 2> /dev/null)" ] && [ "${distro_info}" == "lsb_release" ]; then if [ -z "${distroname}" ]; then distroname="$(lsb_release -sd)" # e.g. Ubuntu 22.04.3 LTS From becff809317e7312085dc7eba35ecbe0afb57c7b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 3 Dec 2023 20:28:30 +0000 Subject: [PATCH 28/28] Release v23.7.0 --- lgsm/modules/core_modules.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 29249fb0bf..42bc04a728 100644 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -8,7 +8,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v23.6.2" +modulesversion="v23.7.0" # Core diff --git a/linuxgsm.sh b/linuxgsm.sh index 8e1d062355..73bcf638a4 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -24,7 +24,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v23.6.2" +version="v23.7.0" shortname="core" gameservername="core" commandname="CORE"