From b513e8c8b81f7522bc568cfb425a9fdd23c428f6 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 1 Dec 2020 20:13:28 +0000 Subject: [PATCH 1/6] codacy changes --- lgsm/functions/mods_core.sh | 94 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 535703430..66cc71d71 100755 --- a/lgsm/functions/mods_core.sh +++ b/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 @@ -605,14 +605,14 @@ fn_mod_install_liblist_gam_file(){ 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 + 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 From 4659f9894170887bb72b2c5ff6a76c14210eefaf Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 4 Dec 2020 14:01:56 +0000 Subject: [PATCH 2/6] codacy codacy --- lgsm/functions/mods_core.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 66cc71d71..47dac4b78 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -575,10 +575,10 @@ fn_mod_install_liblist_gam_file(){ 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 @@ -591,10 +591,10 @@ fn_mod_install_liblist_gam_file(){ 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 @@ -604,7 +604,7 @@ 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 + 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. From b7c8f9e5485fdafa6828ee1340ac469785dc4071 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 4 Dec 2020 14:21:06 +0000 Subject: [PATCH 3/6] v20.6.0 --- lgsm/functions/core_functions.sh | 2 +- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 2fc75f02f..5250e7080 100755 --- a/lgsm/functions/core_functions.sh +++ b/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 diff --git a/linuxgsm.sh b/linuxgsm.sh index 6c63b1244..3c105f4a5 100755 --- a/linuxgsm.sh +++ b/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" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index afb2f8ded..450c2bcf7 100644 --- a/tests/tests_fctrserver.sh +++ b/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" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 34cea40e4..15261bf33 100644 --- a/tests/tests_jc2server.sh +++ b/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" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index f253df31a..e501772fb 100644 --- a/tests/tests_mcserver.sh +++ b/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" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index cf5d5ebd1..0243bf580 100644 --- a/tests/tests_ts3server.sh +++ b/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" From 0b38915f03eb6284654bf360fcc3a19ee10310dd Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 4 Dec 2020 14:28:25 +0000 Subject: [PATCH 4/6] feat:add version and port details to lockfile --- lgsm/functions/command_debug.sh | 2 ++ lgsm/functions/command_monitor.sh | 6 ++++-- lgsm/functions/command_start.sh | 2 ++ tests/tests_fctrserver.sh | 2 ++ tests/tests_jc2server.sh | 2 ++ tests/tests_mcserver.sh | 2 ++ tests/tests_ts3server.sh | 2 ++ 7 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 059cf539a..fe2e8a38e 100755 --- a/lgsm/functions/command_debug.sh +++ b/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" diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index 80d3f43f0..28cc70fab 100755 --- a/lgsm/functions/command_monitor.sh +++ b/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 } diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 62160e187..897cc90aa 100755 --- a/lgsm/functions/command_start.sh +++ b/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" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 450c2bcf7..2c08922c2 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -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" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 15261bf33..39746de57 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -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" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index e501772fb..221e11856 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -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" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 0243bf580..be72227f1 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -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" From e405e84b0f6e90a11b3ee8e00a2559a13177d401 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 4 Dec 2020 20:56:14 +0000 Subject: [PATCH 5/6] updated PVR _default.cfg --- .../config-lgsm/pvrserver/_default.cfg | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index f51bd9ea4..0177b2a95 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/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" From 6bf2351a77953dd7b9730419e2a7128cb514da35 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 4 Dec 2020 21:24:01 +0000 Subject: [PATCH 6/6] code tidy codacy --- lgsm/functions/core_dl.sh | 4 ++-- lgsm/functions/install_config.sh | 2 +- lgsm/functions/mods_core.sh | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index ea20002a8..03ff54383 100755 --- a/lgsm/functions/core_dl.sh +++ b/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}" diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index bf701ebf1..fbff9dbbb 100755 --- a/lgsm/functions/install_config.sh +++ b/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 ) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 47dac4b78..010ff109e 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -609,7 +609,7 @@ fn_mod_install_liblist_gam_file(){ 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} @@ -633,7 +633,7 @@ fn_mod_remove_liblist_gam_file(){ 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} @@ -649,7 +649,7 @@ fn_mod_remove_liblist_gam_file(){ 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} @@ -667,7 +667,7 @@ fn_mod_remove_liblist_gam_file(){ # 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} @@ -690,7 +690,7 @@ fn_mod_install_amxmodx_file(){ 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} @@ -702,7 +702,7 @@ fn_mod_install_amxmodx_file(){ 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 @@ -727,7 +727,7 @@ fn_mod_remove_amxmodx_file(){ 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}