Skip to content

Commit

Permalink
Hotfix v21.1.2 (#3215)
Browse files Browse the repository at this point in the history
* feat(newserver): Valheim (#3212)
* fix(backup): resolve issues with lockfile check and creation (#3214)
  • Loading branch information
dgibbs64 authored Feb 5, 2021
2 parents 1300fb3 + 90a75ae commit b1e321e
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 24 deletions.
178 changes: 178 additions & 0 deletions lgsm/config-default/config-lgsm/vhserver/_default.cfg
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions lgsm/data/serverlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lgsm/functions/command_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion lgsm/functions/core_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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

modulesversion="v21.1.1"
modulesversion="v21.1.2"

# Core

Expand Down Expand Up @@ -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
Expand Down
Empty file modified lgsm/functions/core_steamcmd.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions lgsm/functions/fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions lgsm/functions/fix_vh.sh
Original file line number Diff line number Diff line change
@@ -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
43 changes: 27 additions & 16 deletions lgsm/functions/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion linuxgsm.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_fctrserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_jc2server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_mcserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_ts3server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b1e321e

Please sign in to comment.