Browse Source

Merge branch 'release/v20.6.0' into develop

pull/3142/head
Daniel Gibbs 4 years ago
parent
commit
9c41b667be
  1. 45
      lgsm/config-default/config-lgsm/pvrserver/_default.cfg
  2. 2
      lgsm/functions/command_debug.sh
  3. 6
      lgsm/functions/command_monitor.sh
  4. 2
      lgsm/functions/command_start.sh
  5. 4
      lgsm/functions/core_dl.sh
  6. 2
      lgsm/functions/core_functions.sh
  7. 2
      lgsm/functions/install_config.sh
  8. 96
      lgsm/functions/mods_core.sh
  9. 2
      linuxgsm.sh
  10. 4
      tests/tests_fctrserver.sh
  11. 4
      tests/tests_jc2server.sh
  12. 4
      tests/tests_mcserver.sh
  13. 4
      tests/tests_ts3server.sh

45
lgsm/config-default/config-lgsm/pvrserver/_default.cfg

@ -1,27 +1,33 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT 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
# 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.
#### Server Settings ####
#### Game Server Settings ####
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
ip="0.0.0.0"
port="7777"
# Maps: bridge, datacenter, sand
defaultmap="datacenter"
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
fn_parms(){
parms="${defaultmap} -log -MultiHome=${ip} -Port=${port}"
}
#### 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)
@ -30,8 +36,6 @@ displayip=""
# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
postdays="7"
posttarget="https://hastebin.com"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
@ -63,6 +67,7 @@ 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"
@ -74,8 +79,8 @@ slackalert="off"
slackwebhook="webhook"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
# 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".
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
@ -97,12 +102,12 @@ logdays="7"
# Query delay time
querydelay="1"
#### LinuxGSM Advanced Settings ####
# ANSI Colors
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
ansi="on"
# Message Display Time
#### Advanced Settings ####
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
sleeptime="0.5"
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
@ -130,14 +135,18 @@ stopmode="2"
## Query mode
# 1: session only
# 2: gamedig + gsquery
# 2: gamedig (gsquery fallback)
# 3: gamedig
# 4: gsquery
# 5: tcp
querymode="1"
querytype=""
## LinuxGSM Server Details
## Console type
consoleverbose="no"
consoleinteract="no"
## Game Server Details
# Do not edit
gamename="Pavlov VR"
engine="unreal4"
@ -146,7 +155,7 @@ glibc="2.17"
#### Directories ####
# Edit with care
## Server Specific Directories
## Game Server Directories
systemdir="${serverfiles}/Pavlov"
executabledir="${systemdir}/Binaries/Linux"
executable="./PavlovServer"

2
lgsm/functions/command_debug.sh

@ -95,6 +95,8 @@ fn_print_ok_nl "Starting debug"
# Create lockfile.
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
fn_script_log_info "Lockfile generated"
fn_script_log_info "${lockdir}/${selfname}.lock"

6
lgsm/functions/command_monitor.sh

@ -25,8 +25,10 @@ fn_monitor_check_lockfile(){
fi
# Fix if lockfile is not unix time or contains letters
if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(cat "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then
date '+%s' > "${lockdir}/${selfname}.lock"
if [ -f "${lockdir}/${selfname}.lock" ]&&[[ "$(head -n 1 "${lockdir}/${selfname}.lock")" =~ [A-Za-z] ]]; then
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
fi
}

2
lgsm/functions/command_start.sh

@ -71,6 +71,8 @@ fn_start_tmux(){
# Create lockfile
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
cd "${executabledir}" || exit
tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp"

4
lgsm/functions/core_dl.sh

@ -377,7 +377,7 @@ fn_fetch_file_github(){
fn_fetch_config(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
@ -425,7 +425,7 @@ fn_fetch_function(){
fn_update_function(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"

2
lgsm/functions/core_functions.sh

@ -7,7 +7,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v20.5.1"
modulesversion="v20.6.0"
# Core

2
lgsm/functions/install_config.sh

@ -576,7 +576,7 @@ elif [ "${shortname}" == "mumble" ]; then
fn_fetch_default_config
fn_default_config_remote
fn_list_config_locations
elif [ "${gamename}" == "Pavlov VR" ]; then
elif [ "${shortname}" == "pvr" ]; then
gamedirname="PavlovVR"
fn_check_cfgdir
array_configs+=( Game.ini )

96
lgsm/functions/mods_core.sh

@ -512,10 +512,10 @@ fn_mod_exist(){
fn_mod_required_fail_exist(){
modreq=$1
# requires one parameter, the mod
# requires one parameter, the mod
fn_script_log_fatal "${modreq}-files.txt is empty: unable to find ${modreq} installed"
echo -en "* Unable to find '${modreq}' which is required prior to installing this mod..."
fn_print_fail_eol_nl
fn_print_fail_eol_nl
core_exit.sh
}
@ -527,32 +527,32 @@ fn_mod_liblist_gam_filenames(){
# default libraries
case ${gamename} in
"Counter-Strike 1.6")
"Counter-Strike 1.6")
moddll="mp.dll"
modso="cs.so"
moddylib="cs.dylib"
;;
"Day of Defeat")
"Day of Defeat")
moddll="dod.dll"
modso="dod.so"
moddylib="dod.dylib"
;;
"Team Fortress Classic")
"Team Fortress Classic")
moddll="tfc.dll"
modso="tfc.so"
moddylib="tfc.dylib"
;;
"Natural Selection")
"Natural Selection")
moddll="ns.dll"
modso="ns_i386.so"
moddylib=""
;;
"The Specialists")
"The Specialists")
moddll="mp.dll"
modso="ts_i386.so"
moddylib=""
;;
"Half-Life: Deathmatch")
"Half-Life: Deathmatch")
moddll="hl.dll"
modso="hl.so"
moddylib="hl.dylib"
@ -570,32 +570,32 @@ fn_mod_install_liblist_gam_file(){
logentry="sed replace (dlls\\${moddll}) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll in liblist.gam..."
rpldll="s/dlls\\\\${moddll}/addons\/metamod\/dlls\/metamod.dll/g"
sed -i $rpldll ${modinstalldir}/liblist.gam
grep -q "addons/metamod/dlls/metamod.dll" ${modinstalldir}/liblist.gam
sed -i $rpldll "${modinstalldir}/liblist.gam"
grep -q "addons/metamod/dlls/metamod.dll" "${modinstalldir}/liblist.gam"
exitcode=$?
# if replacement back didn't happen, error out.
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_print_ok_eol_nl
fn_script_log_pass "${logentry}"
fn_print_ok_eol_nl
fi
# modify the liblist.gam file to initialize metamod
logentry="sed replace (dlls\\${modso}) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll_linux in liblist.gam..."
rplso="s/dlls\/${modso}/addons\/metamod\/dlls\/metamod.so/g"
sed -i $rplso ${modinstalldir}/liblist.gam
grep -q "addons/metamod/dlls/metamod.so" ${modinstalldir}/liblist.gam
sed -i $rplso "${modinstalldir}/liblist.gam"
grep -q "addons/metamod/dlls/metamod.so" "${modinstalldir}/liblist.gam"
exitcode=$?
# if replacement back didn't happen, error out
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_print_ok_eol_nl
fn_script_log_pass "${logentry}"
fn_print_ok_eol_nl
fi
# mac os needs to be checked not all mods support mac os
@ -604,15 +604,15 @@ fn_mod_install_liblist_gam_file(){
logentry="sed replace (dlls\\${moddylib}) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll_osx in liblist.gam..."
rpldylib="s/dlls\/${moddylib}/addons\/metamod\/dlls\/metamod.dylib/g"
sed -i $rpldylib ${modinstalldir}/liblist.gam
grep -q "addons/metamod/dlls/metamod.dylib" ${modinstalldir}/liblist.gam
sed -i $rpldylib "${modinstalldir}/liblist.gam"
grep -q "addons/metamod/dlls/metamod.dylib" "${modinstalldir}/liblist.gam"
exitcode=$?
# if replacement back didn't happen, error out.
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
fi
@ -628,15 +628,15 @@ fn_mod_remove_liblist_gam_file(){
logentry="sed replace (addons/metamod/dlls/metamod.dll) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll in liblist.gam..."
rpldll="s/addons\/metamod\/dlls\/metamod.dll/dlls\\\\${moddll}/g"
sed -i $rpldll ${modinstalldir}/liblist.gam
grep -q "${moddll}" ${modinstalldir}/liblist.gam
sed -i $rpldll "${modinstalldir}/liblist.gam"
grep -q "${moddll}" "${modinstalldir}/liblist.gam"
exitcode=$?
# if replacement back didn't happen, error out.
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
@ -644,15 +644,15 @@ fn_mod_remove_liblist_gam_file(){
logentry="sed replace (addons/metamod/dlls/metamod.so) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll_linux in liblist.gam..."
rplso="s/addons\/metamod\/dlls\/metamod.so/dlls\/${modso}/g"
sed -i $rplso ${modinstalldir}/liblist.gam
grep -q "${modso}" ${modinstalldir}/liblist.gam
sed -i $rplso "${modinstalldir}/liblist.gam"
grep -q "${modso}" "${modinstalldir}/liblist.gam"
exitcode=$?
# if replacement back didn't happen, error out
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
@ -662,15 +662,15 @@ fn_mod_remove_liblist_gam_file(){
logentry="sed replace (addons/metamod/dlls/metamod.dylib) ${modinstalldir}/liblist.gam"
echo -en "modifying gamedll_osx in liblist.gam..."
rpldylib="s/addons\/metamod\/dlls\/metamod.dylib/dlls\/${moddylib}/g"
sed -i $rpldylib ${modinstalldir}/liblist.gam
grep -q "${moddylib}" ${modinstalldir}/liblist.gam
sed -i $rpldylib "${modinstalldir}/liblist.gam"
grep -q "${moddylib}" "${modinstalldir}/liblist.gam"
# if replacement back didn't happen, error out.
exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
fi
@ -683,30 +683,30 @@ fn_mod_install_amxmodx_file(){
# since it does exist, is the entry already in plugins.ini
logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) inserted into ${modinstalldir}/addons/metamod/plugins.ini"
echo -en "adding amxmodx_mm_i386.so in plugins.ini..."
grep -q "amxmodx_mm_i386.so" ${modinstalldir}/addons/metamod/plugins.ini
grep -q "amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini"
exitcode=$?
if [ "${exitcode}" != 0 ]; then
# file exists but the entry does not, let's add it
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> ${modinstalldir}/addons/metamod/plugins.ini
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" >> "${modinstalldir}/addons/metamod/plugins.ini"
exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
fi
else
else
# create new file and add the mod to it
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > ${modinstalldir}/addons/metamod/plugins.ini
echo "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" > "${modinstalldir}/addons/metamod/plugins.ini"
exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
core_exit.sh
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
fi
@ -717,26 +717,26 @@ fn_mod_remove_amxmodx_file(){
# since it does exist, is the entry already in plugins.ini
logentry="line (linux addons/amxmodx/dlls/amxmodx_mm_i386.so) removed from ${modinstalldir}/addons/metamod/plugins.ini"
echo -en "removing amxmodx_mm_i386.so in plugins.ini..."
grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" ${modinstalldir}/addons/metamod/plugins.ini
grep -q "linux addons/amxmodx/dlls/amxmodx_mm_i386.so" "${modinstalldir}/addons/metamod/plugins.ini"
# iIs it found? If so remove it and clean up
exitcode=$?
if [ "${exitcode}" == 0 ]; then
# delete the line we inserted
sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' ${modinstalldir}/addons/metamod/plugins.ini
sed -i '/linux addons\/amxmodx\/dlls\/amxmodx_mm_i386.so/d' "${modinstalldir}/addons/metamod/plugins.ini"
# remove empty lines
sed -i '/^$/d' ${modinstalldir}/addons/metamod/plugins.ini
sed -i '/^$/d' "${modinstalldir}/addons/metamod/plugins.ini"
exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_script_log_fatal $logentry
fn_script_log_fatal "${logentry}"
fn_print_fail_eol_nl
else
fn_script_log_pass $logentry
fn_script_log_pass ${logentry}
fn_print_ok_eol_nl
fi
# if file is empty, remove it.
if [ -f "${modinstalldir}/addons/metamod/plugins.ini" ]; then
rm ${modinstalldir}/addons/metamod/plugins.ini
rm "${modinstalldir}/addons/metamod/plugins.ini"
fn_script_log_pass "file removed ${modinstalldir}/addons/metamod/plugins.ini because it was empty"
fi
fi

2
linuxgsm.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v20.5.1"
version="v20.6.0"
shortname="core"
gameservername="core"
commandname="CORE"

4
tests/tests_fctrserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v20.5.1"
version="v20.6.0"
shortname="fctr"
gameservername="fctrserver"
commandname="CORE"
@ -938,6 +938,8 @@ requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"

4
tests/tests_jc2server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v20.5.1"
version="v20.6.0"
shortname="jc2"
gameservername="jc2server"
commandname="CORE"
@ -1097,6 +1097,8 @@ requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"

4
tests/tests_mcserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v20.5.1"
version="v20.6.0"
shortname="mc"
gameservername="mcserver"
commandname="CORE"
@ -970,6 +970,8 @@ requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"

4
tests/tests_ts3server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v20.5.1"
version="v20.6.0"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"
@ -937,6 +937,8 @@ requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
date '+%s' > "${lockdir}/${selfname}.lock"
echo "${version}" >> "${lockdir}/${selfname}.lock"
echo "${port}" >> "${lockdir}/${selfname}.lock"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"

Loading…
Cancel
Save