diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg new file mode 100644 index 0000000000..d6e839c370 --- /dev/null +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -0,0 +1,178 @@ +################################## +######## 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 #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +servername="Valheim Server" +serverpassword="" +port="2456" +gameworld="${selfname}" +public="1" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-name ${servername} -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public}" + +#### 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" + +# 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="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# 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" +rocketchattoken="" + +# 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". +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="5" + +## 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="896660" +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="Valheim" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./valheim_server.x86_64" +serverfiles="${rootdir}/serverfiles" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/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" diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 79139f6808..ec5ae600da 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -105,6 +105,7 @@ ut,utserver,Unreal Tournament ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 +vh,vhserver,Valheim vs,vsserver,Vampire Slayer vints,vintsserver,Vintage Story wet,wetserver,Wolfenstein: Enemy Territory diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh index e04318c857..adce957c99 100644 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -254,12 +254,12 @@ fn_backup_start_server(){ } # Run functions. -fn_backup_create_lockfile +fn_backup_check_lockfile fn_backup_init fn_backup_stop_server fn_backup_dir fn_backup_migrate_olddir -fn_backup_check_lockfile +fn_backup_create_lockfile fn_backup_compression fn_backup_prune fn_backup_start_server diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 88ee01a5fa..a8e9dc03c4 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v21.1.1" +modulesversion="v21.1.2" # Core @@ -490,6 +490,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_vh.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_wurm.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh old mode 100644 new mode 100755 diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 4418c184f0..654ddd3918 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -83,6 +83,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_mta.sh elif [ "${shortname}" == "unt" ]; then fix_unt.sh + elif [ "${shortname}" == "vh" ]; then + fix_vh.sh elif [ "${shortname}" == "wurm" ]; then fix_wurm.sh elif [ "${shortname}" == "zmr" ]; then diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh new file mode 100755 index 0000000000..551bd878f0 --- /dev/null +++ b/lgsm/functions/fix_vh.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh function +# Author: Alasdair Haig +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Valheim + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index ab8e77be44..90aba09dcf 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -583,8 +583,8 @@ fn_info_message_ports(){ parmslocation="${servercfgfullpath}" fi done - # engines/games that require editing the parms. - local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "scpsl" "scpslsm" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" ) + # engines/games that require editing the start parameters. + local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "scpsl" "scpslsm" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" "vh" ) for port_edit in "${ports_edit_array[@]}"; do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then parmslocation="${configdirserver}" @@ -1341,6 +1341,15 @@ fn_info_message_ut(){ } | column -s $'\t' -t } +fn_info_message_vh(){ + echo -e "netstat -atunp | grep valheim" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_info_message_kf2(){ fn_info_message_password_strip echo -e "netstat -atunp | grep KFGame" @@ -1486,6 +1495,10 @@ fn_info_message_select_engine(){ fn_info_message_avorion elif [ "${shortname}" == "arma3" ]; then fn_info_message_arma3 + elif [ "${shortname}" == "bf1942" ]; then + fn_info_message_bf1942 + elif [ "${shortname}" == "bfv" ]; then + fn_info_message_bfv elif [ "${shortname}" == "bo" ]; then fn_info_message_ballisticoverkill elif [ "${shortname}" == "bt" ]; then @@ -1526,8 +1539,18 @@ fn_info_message_select_engine(){ fn_info_message_justcause3 elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 + elif [ "${shortname}" == "mc" ]; then + fn_info_message_minecraft elif [ "${shortname}" == "mcb" ]; then fn_info_message_minecraft_bedrock + elif [ "${shortname}" == "mh" ]; then + fn_info_message_mordhau + elif [ "${shortname}" == "mohaa" ]; then + fn_info_message_mohaa + elif [ "${shortname}" == "mta" ]; then + fn_info_message_mta + elif [ "${shortname}" == "mumble" ]; then + fn_info_message_mumble elif [ "${shortname}" == "onset" ]; then fn_info_message_onset elif [ "${shortname}" == "mom" ]; then @@ -1576,20 +1599,8 @@ fn_info_message_select_engine(){ fn_info_message_unturned elif [ "${shortname}" == "ut" ]; then fn_info_message_ut - elif [ "${shortname}" == "mc" ]; then - fn_info_message_minecraft - elif [ "${shortname}" == "mh" ]; then - fn_info_message_mordhau - elif [ "${shortname}" == "mohaa" ]; then - fn_info_message_mohaa - elif [ "${shortname}" == "mta" ]; then - fn_info_message_mta - elif [ "${shortname}" == "mumble" ]; then - fn_info_message_mumble - elif [ "${shortname}" == "bf1942" ]; then - fn_info_message_bf1942 - elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv + elif [ "${shortname}" == "vh" ]; then + fn_info_message_vh elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "pvr" ]; then diff --git a/linuxgsm.sh b/linuxgsm.sh old mode 100644 new mode 100755 index 2717977b72..2089e38663 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.1.1" +version="v21.1.2" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index e60e9b2124..f522e2c849 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.1.1" +version="v21.1.2" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index ef4642a2ba..24d3190cde 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.1.1" +version="v21.1.2" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 72b9dfca2b..0546931738 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.1.1" +version="v21.1.2" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index d63738602f..abbf6d737f 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.1.1" +version="v21.1.2" shortname="ts3" gameservername="ts3server" commandname="CORE"