Browse Source

Merge branch 'develop' into feature/query-raw

pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
d4f48a0399
  1. 4
      .github/workflows/git-sync.yml
  2. 2
      .github/workflows/lock.yml
  3. 3
      CONTRIBUTING.md
  4. 2
      LICENSE
  5. 6
      README.md
  6. 188
      lgsm/config-default/config-lgsm/loserver/_default.cfg
  7. 1
      lgsm/data/serverlist.csv
  8. 7
      lgsm/functions/core_functions.sh
  9. 6
      lgsm/functions/fix.sh
  10. 17
      lgsm/functions/fix_lo.sh
  11. 7
      lgsm/functions/update_minecraft_bedrock.sh
  12. 2
      linuxgsm.sh
  13. 2
      tests/tests_fctrserver.sh
  14. 2
      tests/tests_jc2server.sh
  15. 2
      tests/tests_mcserver.sh
  16. 2
      tests/tests_ts3server.sh

4
.github/workflows/git-sync.yml

@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: webfactory/ssh-agent
uses: webfactory/ssh-agent@v0.4.1
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.BITBUCKET_SECRET }}
- name: repo-sync
uses: wei/git-sync@v2.1.0
uses: wei/git-sync@v3.0.0
with:
ssh_private_key: ${{ secrets.BITBUCKET_SECRET }}
source_repo: "https://github.com/GameServerManagers/LinuxGSM"

2
.github/workflows/lock.yml

@ -8,7 +8,7 @@ jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@v2.0.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-lock-comment: >

3
CONTRIBUTING.md

@ -48,8 +48,7 @@ Before creating bug reports, please check [this list](https://github.com/GameSer
#### Before Submitting A Bug Report
* **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself.
* **Check that the problem is not related to** [**support page**](https://linuxgsm/com/support) for links to other support options.
* **Check the** [**support page**](https://linuxgsm/com/support) for links to other support options.
* **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options.
* **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one.
#### How Do I Submit A (Good) Bug Report?

2
LICENSE

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2012-2020 Daniel Gibbs
Copyright (c) 2012-2021 Daniel Gibbs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

6
README.md

File diff suppressed because one or more lines are too long

188
lgsm/config-default/config-lgsm/loserver/_default.cfg

@ -0,0 +1,188 @@
##################################
######## 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
servername="LinuxGSM"
ip="0.0.0.0"
port="7777"
queryport="27015"
customerkey=""
providerkey=""
slots="100"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-log -force_steamclient_link -messaging -NoLiveServer -EnableCheats -backendapiurloverride='backend.last-oasis.com' -identifier=${servername} -port=${port} -CustomerKey=${customerkey} -ProviderKey=${providerkey} -slots=${slots} -QueryPort=${queryport} -OverrideConnectionAddress=${ip}"
#### 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 protected]"
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="[email protected]"
mailgunemail="[email protected]"
# 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".
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="920720"
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="Last Oasis"
engine="unreal4"
glibc="2.17"
#### Directories ####
# Edit with care
## Game Server Directories
systemdir="${serverfiles}/Mist"
executabledir="${systemdir}/Binaries/Linux"
executable="./MistServer-Linux-Shipping"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="Game.ini"
servercfgdefault="Game.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"
## 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
lgsm/data/serverlist.csv

@ -51,6 +51,7 @@ jc3,jc3server,Just Cause 3
jk2,jk2server,Jedi Knight II: Jedi Outcast
kf,kfserver,Killing Floor
kf2,kf2server,Killing Floor 2
lo,loserver,Last Oasis
l4d,l4dserver,Left 4 Dead
l4d2,l4d2server,Left 4 Dead 2
mc,mcserver,Minecraft

1 ac acserver Assetto Corsa
51 jk2 jk2server Jedi Knight II: Jedi Outcast
52 kf kfserver Killing Floor
53 kf2 kf2server Killing Floor 2
54 lo loserver Last Oasis
55 l4d l4dserver Left 4 Dead
56 l4d2 l4d2server Left 4 Dead 2
57 mc mcserver Minecraft

7
lgsm/functions/core_functions.sh

@ -8,7 +8,7 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
modulesversion="v21.2.4"
modulesversion="v21.2.5"
# Core
@ -381,6 +381,11 @@ functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_lo.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
fix_mcb.sh(){
functionfile="${FUNCNAME[0]}"
fn_fetch_function

6
lgsm/functions/fix.sh

@ -94,9 +94,9 @@ fi
# Fixes that are run on install only.
if [ "${commandname}" == "INSTALL" ]; then
if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "lo" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
echo -e ""
echo -e "${lightyellow}Applying Post-Install Fixes}${default}"
echo -e "${lightyellow}Applying Post-Install Fixes${default}"
echo -e "================================="
fn_sleep_time
postinstall=1
@ -106,6 +106,8 @@ if [ "${commandname}" == "INSTALL" ]; then
fix_kf.sh
elif [ "${shortname}" == "kf2" ]; then
fix_kf2.sh
elif [ "${shortname}" == "lo" ]; then
fix_lo.sh
elif [ "${shortname}" == "ro" ]; then
fix_ro.sh
elif [ "${shortname}" == "samp" ]; then

17
lgsm/functions/fix_lo.sh

@ -0,0 +1,17 @@
#!/bin/bash
# LinuxGSM fix_lo.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Resolves installation issue with Last Oasis
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
local APPID_FILE=${executabledir}/steam_appid.txt
if [ ! -f "${APPID_FILE}" ]; then
fn_print_information "adding ${APPID_FILE} to ${gamename} server."
fn_sleep_time
echo "903950" > "${APPID_FILE}"
else
fn_print_information "${APPID_FILE} already exists. No action to be taken."
fn_sleep_time
fi

7
lgsm/functions/update_minecraft_bedrock.sh

@ -7,8 +7,11 @@
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
#random number for userAgent
randnum=$((1 + RANDOM % 5000))
fn_update_minecraft_dl(){
latestmcbuildurl=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip')
latestmcbuildurl=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip')
fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip"
echo -e "Extracting to ${serverfiles}...\c"
if [ "${firstcommandname}" == "INSTALL" ]; then
@ -79,7 +82,7 @@ fn_update_minecraft_localbuild(){
fn_update_minecraft_remotebuild(){
# Gets remote build info.
remotebuild=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
# Checks if remotebuild variable has been set.

2
linuxgsm.sh

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

2
tests/tests_fctrserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v21.2.4"
version="v21.2.5"
shortname="fctr"
gameservername="fctrserver"
commandname="CORE"

2
tests/tests_jc2server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v21.2.4"
version="v21.2.5"
shortname="jc2"
gameservername="jc2server"
commandname="CORE"

2
tests/tests_mcserver.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v21.2.4"
version="v21.2.5"
shortname="mc"
gameservername="mcserver"
commandname="CORE"

2
tests/tests_ts3server.sh

@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="v21.2.4"
version="v21.2.5"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"

Loading…
Cancel
Save