Browse Source

Merge remote-tracking branch 'upstream/master' into config-select

Conflicts:
	functions/fn_getopt
pull/372/head
Ilija Matoski 10 years ago
parent
commit
c11dcb0798
  1. 155
      .travis.yml
  2. 13
      7DaysToDie/sdtdserver
  3. BIN
      Insurgency/dependencies/libm.so.6
  4. 2
      LICENSE
  5. BIN
      NS2Combat/dependencies/libc.so.6
  6. BIN
      NS2Combat/dependencies/libm.so.6
  7. BIN
      NS2Combat/dependencies/libstdc++.so.6
  8. 103
      NS2Combat/ns2cserver
  9. 92
      ProjectZomboid/pzserver
  10. 28
      README.md
  11. 4
      functions/fn_check_ip
  12. 11
      functions/fn_check_logs
  13. 8
      functions/fn_check_tmux
  14. 6
      functions/fn_debug
  15. 33
      functions/fn_details
  16. 9
      functions/fn_details_config
  17. 7
      functions/fn_functions
  18. 26
      functions/fn_getopt
  19. 9
      functions/fn_insfix
  20. 3
      functions/fn_install_glibcfix
  21. 4
      functions/fn_install_gsquery
  22. 11
      functions/fn_install_logs
  23. 4
      functions/fn_logs
  24. 6
      functions/fn_monitor
  25. 73
      functions/fn_start
  26. 117
      functions/fn_stop
  27. 43
      functions/fn_update_check
  28. 6
      functions/fn_update_dl
  29. 20
      functions/fn_validate
  30. BIN
      images/icons/centos-icon-32.png
  31. BIN
      images/icons/debian-icon-32.png
  32. BIN
      images/icons/ubuntu-icon-32.png
  33. 3
      images/logo/README.md
  34. BIN
      images/logo/assets/lgsm-font-pt_sans.zip
  35. BIN
      images/logo/assets/lgsm-square.xcf
  36. BIN
      images/logo/assets/lgsm.xcf
  37. BIN
      images/logo/assets/lgsm_full.xcf
  38. BIN
      images/logo/lgsm-250x143-dark.png
  39. BIN
      images/logo/lgsm-250x143-light.png
  40. BIN
      images/logo/lgsm-full-dark.png
  41. BIN
      images/logo/lgsm-full-light.png
  42. BIN
      images/logo/lgsm-site-foot.png
  43. BIN
      images/logo/lgsm-site-head.png
  44. BIN
      images/logo/lgsm-square-114-dark.png
  45. BIN
      images/logo/lgsm-square-114-light.png
  46. BIN
      images/logo/lgsm-square-16-dark.png
  47. BIN
      images/logo/lgsm-square-16-light.png
  48. BIN
      images/logo/lgsm-square-184-dark.png
  49. BIN
      images/logo/lgsm-square-184-light.png
  50. BIN
      images/logo/lgsm-square-24-dark.png
  51. BIN
      images/logo/lgsm-square-24-light.png
  52. BIN
      images/logo/lgsm-square-32-dark.png
  53. BIN
      images/logo/lgsm-square-32-light.png
  54. BIN
      images/logo/lgsm-square-512-dark.png
  55. BIN
      images/logo/lgsm-square-512-light.png
  56. BIN
      images/logo/lgsm-square-64-dark.png
  57. BIN
      images/logo/lgsm-square-64-light.png
  58. BIN
      images/screens/Tmux.png

155
.travis.yml

@ -0,0 +1,155 @@
language: bash
before_script:
- curl -L "https://shunit2.googlecode.com/files/shunit2-2.1.6.tgz" | tar zx
- mkdir /home/travis/build/dgibbs64/linuxgsm/7DaysToDie/serverfiles
- touch /home/travis/build/dgibbs64/linuxgsm/7DaysToDie/serverfiles/serverconfig.xml
- mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrike/serverfiles/
- mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrike/serverfiles/cstrike
- mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/
- mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/csgo
- mkdir /home/travis/build/dgibbs64/linuxgsm/CounterStrikeGlobalOffensive/serverfiles/csgo/cfg
- mkdir /home/travis/build/dgibbs64/linuxgsm/JustCause2/serverfiles/
- touch /home/travis/build/dgibbs64/linuxgsm/JustCause2/serverfiles/default_config.lua
- mkdir /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles
- mkdir /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles/System
- touch /home/travis/build/dgibbs64/linuxgsm/KillingFloor/serverfiles/System/Default.ini
- mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/Zomboid
- mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/Zomboid/Server
- mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/serverfiles
- mkdir /home/travis/build/dgibbs64/linuxgsm/ProjectZomboid/serverfiles/projectzomboid
- mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles
- mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/
- mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/SeriousSam3
- mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Content/SeriousSam3/Config
- mkdir /home/travis/build/dgibbs64/linuxgsm/SeriousSam3BFE/serverfiles/Bin
- mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles
- mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles/System
- touch /home/travis/build/dgibbs64/linuxgsm/UnrealTournament2004/serverfiles/System/ut2k4-server.ini
- mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles
- mkdir /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles/System
- touch /home/travis/build/dgibbs64/linuxgsm/UnrealTournament99/serverfiles/System/ut99-server.ini
- mkdir /home/travis/build/dgibbs64/linuxgsm/TeamSpeak3/serverfiles
script:
- bash 7DaysToDie/sdtdserver auto-install
- bash 7DaysToDie/sdtdserver start
- bash 7DaysToDie/sdtdserver stop
- bash 7DaysToDie/sdtdserver restart
- bash 7DaysToDie/sdtdserver validate
- bash 7DaysToDie/sdtdserver monitor
- bash 7DaysToDie/sdtdserver email-test
- bash 7DaysToDie/sdtdserver details
- bash Arma3/arma3server auto-install
- bash Arma3/arma3server start
- bash Arma3/arma3server stop
- bash Arma3/arma3server restart
- bash Arma3/arma3server validate
- bash Arma3/arma3server monitor
- bash Arma3/arma3server email-test
- bash Arma3/arma3server details
- bash CounterStrike/csserver auto-install
- bash CounterStrike/csserver start
- bash CounterStrike/csserver stop
- bash CounterStrike/csserver restart
- bash CounterStrike/csserver validate
- bash CounterStrike/csserver monitor
- bash CounterStrike/csserver email-test
- bash CounterStrike/csserver details
- bash CounterStrikeGlobalOffensive/csgoserver auto-install
- bash CounterStrikeGlobalOffensive/csgoserver start
- bash CounterStrikeGlobalOffensive/csgoserver stop
- bash CounterStrikeGlobalOffensive/csgoserver restart
- bash CounterStrikeGlobalOffensive/csgoserver validate
- bash CounterStrikeGlobalOffensive/csgoserver monitor
- bash CounterStrikeGlobalOffensive/csgoserver email-test
- bash CounterStrikeGlobalOffensive/csgoserver details
- bash JustCause2/jc2server auto-install
- bash JustCause2/jc2server start
- bash JustCause2/jc2server stop
- bash JustCause2/jc2server restart
- bash JustCause2/jc2server validate
- bash JustCause2/jc2server monitor
- bash JustCause2/jc2server email-test
- bash JustCause2/jc2server details
- bash KillingFloor/kfserver auto-install
- bash KillingFloor/kfserver start
- bash KillingFloor/kfserver stop
- bash KillingFloor/kfserver restart
- bash KillingFloor/kfserver validate
- bash KillingFloor/kfserver monitor
- bash KillingFloor/kfserver email-test
- bash KillingFloor/kfserver details
- bash NaturalSelection2/ns2server auto-install
- bash NaturalSelection2/ns2server start
- bash NaturalSelection2/ns2server stop
- bash NaturalSelection2/ns2server restart
- bash NaturalSelection2/ns2server validate
- bash NaturalSelection2/ns2server monitor
- bash NaturalSelection2/ns2server email-test
- bash NaturalSelection2/ns2server details
- bash ProjectZomboid/pzserver auto-install
- bash ProjectZomboid/pzserver start
- bash ProjectZomboid/pzserver stop
- bash ProjectZomboid/pzserver restart
- bash ProjectZomboid/pzserver validate
- bash ProjectZomboid/pzserver monitor
- bash ProjectZomboid/pzserver email-test
- bash ProjectZomboid/pzserver details
- bash SeriousSam3BFE/ss3sserver auto-install
- bash SeriousSam3BFE/ss3sserver start
- bash SeriousSam3BFE/ss3sserver stop
- bash SeriousSam3BFE/ss3sserver restart
- bash SeriousSam3BFE/ss3sserver validate
- bash SeriousSam3BFE/ss3sserver monitor
- bash SeriousSam3BFE/ss3sserver email-test
- bash SeriousSam3BFE/ss3sserver details
- bash StarBound/sbserver auto-install
- bash StarBound/sbserver start
- bash StarBound/sbserver stop
- bash StarBound/sbserver restart
- bash StarBound/sbserver validate
- bash StarBound/sbserver monitor
- bash StarBound/sbserver email-test
- bash StarBound/sbserver details
- bash UnrealTournament2004/ut2k4server start
- bash UnrealTournament2004/ut2k4server stop
- bash UnrealTournament2004/ut2k4server restart
- bash UnrealTournament2004/ut2k4server monitor
- bash UnrealTournament2004/ut2k4server email-test
- bash UnrealTournament2004/ut2k4server details
- bash UnrealTournament99/ut99server start
- bash UnrealTournament99/ut99server stop
- bash UnrealTournament99/ut99server restart
- bash UnrealTournament99/ut99server monitor
- bash UnrealTournament99/ut99server email-test
- bash UnrealTournament99/ut99server details
- bash TeamSpeak3/ts3server start
- bash TeamSpeak3/ts3server stop
- bash TeamSpeak3/ts3server restart
- bash TeamSpeak3/ts3server update
- bash TeamSpeak3/ts3server monitor
- bash TeamSpeak3/ts3server email-test
- bash TeamSpeak3/ts3server details

13
7DaysToDie/sdtdserver

@ -17,7 +17,18 @@ steamuser="username"
steampass="password"
# Start Variables
ip="0.0.0.0"
ip="0.0.0.0" # can leave to answer on any IP
# Mod Variables
# If you are using or want to use Alloc's Server Fixes,
# uncomment the variable below
# *****Note: It has happened where the core gets updated, but
# Alloc's fixes weren't updated yet. If this happens
# you may need to comment out or set to false temporarily
# until Alloc's patch is updated. Please see 7 Days To Die
# forum for details. Many people use this patch.
allocsfixes=true # set to true if you want installed, false or comment if not
# http://7daystodie.gamepedia.com/Server
fn_parms(){

BIN
Insurgency/dependencies/libm.so.6

Binary file not shown.

2
LICENSE

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 Daniel Gibbs
Copyright (c) 2015 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

BIN
NS2Combat/dependencies/libc.so.6

Binary file not shown.

BIN
NS2Combat/dependencies/libm.so.6

Binary file not shown.

BIN
NS2Combat/dependencies/libstdc++.so.6

Binary file not shown.

103
NS2Combat/ns2cserver

@ -0,0 +1,103 @@
#!/bin/bash
# NS2: Combat
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="username"
steampass="password"
# Start Variables
defaultmap="co_core"
port="27015"
maxplayers="24"
ip="0.0.0.0"
servername="NS2C Server"
webadminuser="admin"
webadminpass="admin"
webadminport="8080"
configpath="server1"
modstorage="server1/Workshop"
mods=""
password=""
# Add the following line to the parms if you want a private server. Ensuring
# that the password variable above is not left empty.
# -password \"${password}\"
# http://wiki.unknownworlds.com/ns2/Dedicated_Server
fn_parms(){
parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${rootdir}/${configpath}\" -modstorage \"${rootdir}/${modstorage}\" -mods \"${mods}\""
}
#### Advanced Variables ####
# Steam
appid="313900"
# Server Details
servicename="ns2c-server"
gamename="NS2: Combat"
engine="spark"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}/ia32"
executable="./ns2combatserver_linux32"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

92
ProjectZomboid/pzserver

@ -0,0 +1,92 @@
#!/bin/bash
# Project Zomboid
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 150415
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
ip="0.0.0.0"
fn_parms(){
parms=""
}
#### Advanced Variables ####
# Steam
appid="108600"
# Server Details
servicename="pz-server"
gamename="Project Zomboid"
engine="projectzomboid"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/projectzomboid"
executabledir="${filesdir}"
executable="./projectzomboid-dedi-server.sh"
servercfgdir="${rootdir}/Zomboid/Server"
servercfg="servertest.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/servertest.ini"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${HOME}/Zomboid/Logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

28
README.md

@ -1,7 +1,13 @@
<h1>Linux Game Server Managers_ <a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Install</a></h1>
<a href="http://gameservermanagers.com"><img src="http://wiki.gameservermanagers.com/w//images/9/9d/Lgsm_full-2.png" alt="linux Game Server Managers" width="600" /></a>
<h1>Linux Game Server Managers_</h1>
<a href="http://gameservermanagers.com"><img src="https://github.com/dgibbs64/linuxgsm/blob/master/images/logo/lgsm-full-light.png" alt="linux Game Server Managers" width="600" /></a>
[![Build Status](https://travis-ci.org/dgibbs64/linuxgsm.svg?branch=master)](https://travis-ci.org/dgibbs64/linuxgsm)
The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice comms servers.
<h2>Hassle Free Dedicated Servers</h2>
Game servers traditionally are not easy to manage yourself. Admins often have to spend hours just messing around trying to get there server working. LGSM is designed to be a simple as possible allowing Admins to spend less time on management and more time on the fun stuff.
<h2>Main features</h2>
<ul>
<li>Backup</li>
@ -21,13 +27,13 @@ The Linux Game Server Managers are tested to work on the following Linux distros
Other distros are likely to work but are not fully tested.
<h3>Specific Requirements</h3>
<ul>
<li><a href="http://wiki.gameservermanagers.com/wiki/Glibc">GLIBC</a> >= 2.15 recommended [<a href="http://wiki.gameservermanagers.com/wiki/Glibc#Server_Requirements">specific requirements</a>].</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Tmux">Tmux</a> >= 1.6 recommended (Avoid Tmux 1.8).</li>
<li><a href="https://github.com/dgibbs64/linuxgsm/wiki/Glibc">GLIBC</a> >= 2.15 recommended [<a href="https://github.com/dgibbs64/linuxgsm/wiki/Glibc#server-requirements">specific requirements</a>].</li>
<li><a href="https://github.com/dgibbs64/linuxgsm/wiki/Tmux">Tmux</a> >= 1.6 recommended (Avoid Tmux 1.8).</li>
</ul>
<h2>FAQ</h2>
All FAQ can be found here.
<a href="http://wiki.gameservermanagers.com/wiki/FAQ">http://wiki.gameservermanagers.com/wiki/FAQ</a>
<a href="https://github.com/dgibbs64/linuxgsm/wiki/FAQ">https://github.com/dgibbs64/linuxgsm/wiki/FAQ</a>
<h2>Donate</h2>
If you want to donate to the project you can via PayPal, Flattr or Gratipay. I have had a may kind people show there support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
<ul>
@ -36,11 +42,11 @@ If you want to donate to the project you can via PayPal, Flattr or Gratipay. I h
<h2>Useful Links</h2>
<ul>
<li><a href="http://gameservermanagers.com">Homepage</li>
<li><a href="http://gameservermanagers.com">Wiki</li>
<li><a href="https://github.com/dgibbs64/linuxgsm/wiki">Wiki</li>
<li><a href="https://github.com/dgibbs64/linuxgsm">GitHub Code</li>
<li><a href="https://github.com/dgibbs64/linuxgsm/issues">GitHub Issues</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Steam Group</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Twitter</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Facebook</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Google+</li>
</ul>
<li><a href="http://steamcommunity.com/groups/linuxgsm">Steam Group</li>
<li><a href="https://twitter.com/dangibbsuk">Twitter</li>
<li><a href="https://www.facebook.com/linuxgsm">Facebook</li>
<li><a href="https://plus.google.com/+Gameservermanagers1">Google+</li>
</ul>

4
functions/fn_check_ip

@ -2,7 +2,7 @@
# LGSM fn_check_ip function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 260115
# Version: 170415
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manualy set using ip="0.0.0.0".
@ -21,6 +21,8 @@ if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
echo -en "Manually specify the IP you want to use within the ${selfname} script.\n"
echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
echo -en "${getip}\n"
echo -en ""
echo -en "http://gameservermanagers.com/network-interfaces"
exit
else
ip=${getip}

11
functions/fn_check_logs

@ -2,7 +2,7 @@
# LGSM fn_check_logs function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 230215
# Version: 160415
# Description: Checks that log files exist on server start
# Create dir's for the script and console logs
@ -17,6 +17,12 @@ if [ ! -f "${scriptlog}" ]; then
touch "${scriptlog}"
mkdir -v "${consolelogdir}"
touch "${consolelog}"
# If a server is Project Zomboid create a symbolic link to the game server logs
if [ "${engine}" == "projectzomboid" ]; then
ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
fi
# If a server is source or goldsource create a symbolic link to the game server logs
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
@ -25,6 +31,7 @@ if [ ! -f "${scriptlog}" ]; then
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
fi
# If a server is unreal2 or unity3d create a dir
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
mkdir -pv "${gamelogdir}"
@ -34,6 +41,7 @@ if [ ! -f "${scriptlog}" ]; then
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
fi
fi
# If a server is starbound create a symbolic link to the game server logs
if [ "${engine}" == "starbound" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
@ -42,6 +50,7 @@ if [ ! -f "${scriptlog}" ]; then
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
fi
# If server uses SteamCMD create a symbolic link to the Steam logs
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -h "${rootdir}/log/steamcmd" ]; then

8
functions/fn_check_tmux

@ -2,17 +2,19 @@
# LGSM fn_check_tmux function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 110315
# Version: 170415
# Checks if tmux is installed as too many users do not RTFM or know how to use Google.
if [ -z "$(command -v tmux)" ]; then
if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
:
else
fn_printfailnl "Tmux not installed"
sleep 1
fn_scriptlog "Tmux is not installed"
echo " * Tmux is required to run this server."
# Suitable passive agressive message
echo " * Please see the the following link."
echo " * http://gameservermanagers.com/dependencies"
echo " * http://gameservermanagers.com/tmux"
exit
fi

6
functions/fn_debug

@ -2,7 +2,7 @@
# LGSM fn_debug function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
# Version: 160415
# Description: Runs the server without tmux. Runs direct from the terminal.
@ -10,6 +10,7 @@ local modulename="Debug"
fn_check_root
fn_check_systemdir
fn_check_ip
fn_check_logs
fn_details_distro
fn_parms
echo ""
@ -53,6 +54,9 @@ sleep 1
echo -en "\n"
cd "${executabledir}"
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ "${gamename}" == "Insurgency" ]; then
fn_insfix
fi
${executable} ${parms} -debug
else
${executable} ${parms}

33
functions/fn_details

@ -2,7 +2,7 @@
# LGSM fn_details function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 230214
# Version: 190414
# Description: Displays server infomation.
@ -168,6 +168,33 @@ rm -f .fn_details_ports
fn_details_statusbottom
}
fn_details_projectzomboid(){
fn_check_ip
fn_details_config
fn_details_distro
fn_details_os
fn_details_performance
fn_details_disk
fn_details_gameserver
fn_details_backup
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo -e ""
echo -e "\e[92mPorts\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
echo -e "Change ports by editing the command-line"
echo -e "parameters in ${selfname}."
echo -e ""
echo -e "Useful port diagnostic command:"
echo -e "netstat -atunp | grep java"
echo -e ""
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
column -s $'\t' -t .fn_details_ports
rm -f .fn_details_ports
fn_details_statusbottom
}
fn_details_realvirtuality(){
fn_check_ip
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
@ -397,7 +424,7 @@ echo -e ""
echo -e "\e[92m${servername} Telnet\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" >> .fn_details_ports
echo -e "\e[34mTelnet address:\t\e[0m${ip}:${telnetport}" >> .fn_details_ports
echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}" >> .fn_details_ports
echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" >> .fn_details_ports
column -s $'\t' -t .fn_details_ports
rm -f .fn_details_ports
@ -463,6 +490,8 @@ fn_details_statusbottom
if [ "${engine}" == "avalanche" ]; then
fn_details_avalanche
elif [ "${engine}" == "projectzomboid" ]; then
fn_details_projectzomboid
elif [ "${engine}" == "realvirtuality" ]; then
fn_details_realvirtuality
elif [ "${engine}" == "seriousengine35" ]; then

9
functions/fn_details_config

@ -2,12 +2,16 @@
# LGSM fn_details_config function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 080215
# Version: 160415
# Description: Gets specific details from config files.
if [ "${engine}" == "avalanche" ]; then
servername=$(grep -s Name "${servercfgfullpath}"|sed 's/Name//g' | tr -d '=\"; '|sed 's/,//g')
servername=$(grep -s Name "${servercfgfullpath}"|sed 's/Name//g'|tr -d '=\"; '|sed 's/,//g')
elif [ "${engine}" == "projectzomboid" ]; then
servername=$(grep -s PublicName= "${servercfgfullpath}"|sed 's/PublicName=//g'|tr -d '=\";'|sed 's/,//g')
port=$(grep -s DefaultPort= "${servercfgfullpath}"|sed 's/DefaultPort=//g'|tr -cd [:digit:])
elif [ "${engine}" == "realvirtuality" ]; then
servername=$(grep -s hostname "${servercfgfullpath}"| grep -v //|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
@ -39,6 +43,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then
queryport="10011"
fileport="30033"
fi
elif [ "${engine}" == "unity3d" ]; then
servername=$(grep ServerName "${servercfgfullpath}"|sed 's/^.*value="//'|cut -f1 -d"\"")
port=$(grep ServerPort "${servercfgfullpath}"|tr -cd [:digit:])

7
functions/fn_functions

@ -2,7 +2,7 @@
# LGSM fn_functions function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 190215
# Version: 110415
# Description: Defines all functions to allow download and execution of functions using fn_runfunction.
# This function is called first before any other function. Without this file other functions would not load.
@ -101,6 +101,11 @@ functionfile="${FUNCNAME}"
fn_runfunction
}
fn_insfix(){
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_logs(){
functionfile="${FUNCNAME}"
fn_runfunction

26
functions/fn_getopt

@ -2,7 +2,7 @@
# LGSM fn_getopt function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 150314
# Version: 150414
# Description: getopt arguments.
@ -15,16 +15,9 @@ case "$getopt" in
restart)
fn_restart;;
update)
norestart=1;
fn_update_check;;
update-restart)
fn_update_check;;
validate)
fn_validate;;
validate-restart)
fn_stop
fn_validate
fn_start;;
monitor)
fn_monitor;;
email-test)
@ -42,7 +35,7 @@ case "$getopt" in
auto-install)
fn_autoinstall;;
*)
echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install|auto-install} $appendextra"
echo "Usage: $0 {start|stop|restart|update|validate|monitor|email-test|details|backup|console|debug|install|auto-install} $appendextra"
exit 1;;
esac
exit
@ -58,8 +51,6 @@ case "$getopt" in
fn_restart;;
update)
fn_update_check;;
backup)
fn_backup;;
monitor)
fn_monitor;;
email-test)
@ -69,7 +60,7 @@ case "$getopt" in
backup)
fn_backup;;
*)
echo "Usage: $0 {start|stop|restart|backup|monitor|email-test|details|backup} $appendextra"
echo "Usage: $0 {start|stop|restart|update|monitor|email-test|details|backup} $appendextra"
exit 1;;
esac
exit
@ -116,16 +107,9 @@ case "$getopt" in
restart)
fn_restart;;
update)
norestart=1;
fn_update_check;;
update-restart)
fn_update_check;;
validate)
fn_validate;;
validate-restart)
fn_stop
fn_validate
fn_start;;
monitor)
fn_monitor;;
email-test)
@ -145,7 +129,7 @@ case "$getopt" in
map-compressor)
fn_compress_unreal2maps;;
*)
echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install|auto-install|map-compressor} $appendextra"
echo "Usage: $0 {start|stop|restart|update|validate|monitor|email-test|details|backup|console|debug|install|auto-install|map-compressor} $appendextra"
exit 1;;
esac
exit
@ -194,4 +178,4 @@ elif [ "${engine}" == "unreal" ]; then
fn_getopt_unreal
else
fn_getopt_generic
fi
fi

9
functions/fn_insfix

@ -0,0 +1,9 @@
#!/bin/bash
# LGSM fn_insfix function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 110415
# Description: Resolves ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory
export LD_LIBRARY_PATH=:${filesdir}:${filesdir}/bin:{$LD_LIBRARY_PATH}

3
functions/fn_install_glibcfix

@ -2,7 +2,7 @@
# LGSM fn_install_glibcfix function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
# Version: 220315
# Version: 110415
fn_glibcfixmsg(){
echo ""
@ -79,6 +79,7 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
fn_glibcfixmsg
cd "${filesdir}/bin"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libm.so.6
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libpthread.so.0
# Natural Selection 2

4
functions/fn_install_gsquery

@ -2,12 +2,12 @@
# LGSM fn_install_gsquery function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
# Version: 100415
fn_dlgsquery(){
cd "${rootdir}"
echo -e "downloading gsquery.py...\c"
wget -N --no-check-certificate /dev/null "http://danielgibbs.co.uk/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- | uniq
wget -N --no-check-certificate /dev/null "http://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- | uniq
chmod +x gsquery.py
}

11
functions/fn_install_logs

@ -2,7 +2,7 @@
# LGSM fn_install_logs function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 230215
# Version: 160415
echo ""
echo "Creating log directorys"
@ -14,6 +14,12 @@ mkdir -v "${scriptlogdir}"
touch "${scriptlog}"
mkdir -v "${consolelogdir}"
touch "${consolelog}"
# If a server is Project Zomboid create a symbolic link to the game server logs
if [ "${engine}" == "projectzomboid" ]; then
ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
fi
# If a server is source or goldsource create a symbolic link to the game server logs
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
@ -22,6 +28,7 @@ if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
fi
# If a server is unreal2 or unity3d create a dir
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
mkdir -pv "${gamelogdir}"
@ -31,6 +38,7 @@ if [ "${gamename}" == "7 Days To Die" ]; then
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
fi
fi
# If a server is starbound create a symbolic link to the game server logs
if [ "${engine}" == "starbound" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
@ -39,6 +47,7 @@ if [ "${engine}" == "starbound" ]; then
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
fi
# If server uses SteamCMD create a symbolic link to the Steam logs
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -h "${rootdir}/log/steamcmd" ]; then

4
functions/fn_logs

@ -36,9 +36,13 @@ if [ $(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l) -ne "0" ]; then
gamecount=$(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l)
fi
scriptcount=$(find "${scriptlogdir}"/* -mtime +${logdays}|wc -l)
echo "${consolelog}"
if [ -n "${consolelog}" ]; then
consolecount=$(find "${consolelogdir}"/* -mtime +${logdays}|wc -l)
else
consolecount=0
fi
count=$((${scriptcount} + ${consolecount}))
if [ "${engine}" == "unreal2" ]; then
count=$((${scriptcount} + ${consolecount} + ${gamecount}))

6
functions/fn_monitor

@ -2,7 +2,7 @@
# LGSM fn_monitor function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 080215
# Version: 230315
# Description: Monitors server by checking for running proccesses
# then passes to fn_monitor_query.
@ -66,7 +66,7 @@ if [ ! -f "${lockselfname}" ]; then
fn_scriptlog "Disabled: No lock file found"
sleep 1
echo -en "\n"
echo "To enable monitor run ${selfname} start"
echo "To enable monitor run ./${selfname} start"
exit
fi
@ -76,7 +76,7 @@ if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "$
fn_printdots "Checking session: CHECKING"
fn_scriptlog "Checking session: CHECKING"
sleep 1
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -E "^${servicename}:"|wc -l)
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then
fn_printok "Checking session: OK"
fn_scriptlog "Checking session: OK"

73
functions/fn_start

@ -2,7 +2,7 @@
# LGSM fn_start function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 160214
# Version: 220415
# Description: Starts the server.
@ -10,14 +10,14 @@ local modulename="Starting"
fn_start_teamspeak3(){
# Create any missing log dirs
if [ ! -d ${scriptlogdir} ];then
mkdir ${rootdir}/log
mkdir ${scriptlogdir}
if [ ! -d "${scriptlogdir}" ];then
mkdir "${rootdir}/log"
mkdir "${scriptlogdir}"
fn_printinfo "Creating log directorys ${scriptlogdir}"
fn_scriptlog "Creating log directorys ${scriptlogdir}"
fi
if [ ! -h ${rootdir}/log/server ]; then
ln -sv ${gamelogdir} ${rootdir}/log/server
if [ ! -h "${rootdir}/log/server" ]; then
ln -sv "${gamelogdir} ${rootdir}/log/server"
fi
fn_check_root
@ -30,7 +30,7 @@ if [ "${ts3status}" = "Server is running" ]; then
echo -en "\n"
exit
fi
if [ ! -e ${servercfgfullpath} ]; then
if [ ! -e "${servercfgfullpath}" ]; then
fn_printwarn "${servercfgfullpath} is missing"
fn_scriptlog "${servercfgfullpath} is missing"
sleep 1
@ -50,7 +50,7 @@ mv "${scriptlog}" "${scriptlogdate}"
# Create lock file
date > "${rootdir}/${lockselfname}"
cd "${executabledir}"
./ts3server_startscript.sh start inifile=${servercfgfullpath} > /dev/null 2>&1
./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1
sleep 1
fn_check_ts3status
if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ];then
@ -74,6 +74,9 @@ if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
startfix=1
fn_csgofix
fi
if [ "${gamename}" == "Insurgency" ]; then
fn_insfix
fi
fn_details_config
fn_parms
fn_logs
@ -116,21 +119,59 @@ else
fi
sleep 1
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
# If the server fails to start
if [ "${tmuxwc}" -eq 0 ]; then
fn_printfailnl "Unable to start ${servername}"
fn_printfail "Unable to start ${servername}"
fn_scriptlog "Unable to start ${servername}"
echo -e " Check log files: ${rootdir}/log"
echo -en " Run debug mode: ./${selfname} debug"
sleep 1
if [ -s "${scriptlogdir}/.${servicename}-tmux-error.tmp" ]; then
fn_printfail "Unable to start ${servername}: Tmux returned the following error:"
fn_scriptlog "tmux returned the following error"
sleep 1
echo -en "\n"
echo ""
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp"
cat "${scriptlogdir}/.${servicename}-tmux-error.tmp" >> "${scriptlog}"
sleep 1
echo ""
# Detected error http://gameservermanagers.com/issues
if [ $(grep -c "Operation not permitted" "${scriptlogdir}/.${servicename}-tmux-error.tmp") ];then
if [ ! $(grep "tty:" /etc/group|grep "$(whoami)") ];then
echo "================================="
echo "$(whoami) is not part of the tty group."
fn_scriptlog "$(whoami) is not part of the tty group."
group=$(grep tty /etc/group)
echo ""
echo " ${group}"
fn_scriptlog "${group}"
echo ""
echo "Run the following command with root privileges."
echo ""
echo " usermod -G tty $(whoami)"
echo ""
echo "http://gameservermanagers.com/tmux-op-perm"
fn_scriptlog "http://gameservermanagers.com/tmux-op-perm"
echo "================================="
else
echo "$(whoami) is part of the tty group."
group=$(grep tty /etc/group)
echo ""
echo " ${group}"
fn_scriptlog "${group}"
echo ""
echo "No known fix currently."
fn_scriptlog "No known fix currently."
echo "http://gameservermanagers.com/issues"
fn_scriptlog "http://gameservermanagers.com/issues"
fi
fi
else
fn_printok "${servername}"
fn_scriptlog "Started ${servername}"
fi
else
fn_printok "${servername}"
fn_scriptlog "Started ${servername}"
fi
rm "${scriptlogdir}/.${servicename}-tmux-error.tmp"
sleep 1
#rm "${scriptlogdir}/.${servicename}-tmux-error.tmp"
echo -en "\n"
}

117
functions/fn_stop

@ -8,6 +8,27 @@
local modulename="Stopping"
sdtd_telnet(){
sdtdshutdown=$( expect -c '
proc abort {} {
puts "Timeout or EOF\n"
exit 1
}
spawn telnet '"${telnetip}"' '"${telnetport}"'
expect {
"password:" { send "'"${telnetpass}"'\r" }
default abort
}
expect {
"session." { send "shutdown\r" }
default abort
}
expect { eof }
puts "Completed.\n"
')
}
fn_stop_teamspeak3(){
fn_check_root
fn_check_systemdir
@ -16,12 +37,12 @@ fn_scriptlog "${servername}"
sleep 1
fn_check_ts3status
if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ];then
fn_printfail "${servername} is already stopped"
fn_scriptlog "${servername} is already stopped"
fn_printfail "${servername} is already stopped"
fn_scriptlog "${servername} is already stopped"
else
${filesdir}/ts3server_startscript.sh stop inifile=${ini} > /dev/null 2>&1
fn_printok "${servername}"
fn_scriptlog "Stopped ${servername}"
${filesdir}/ts3server_startscript.sh stop inifile=${ini} > /dev/null 2>&1
fn_printok "${servername}"
fn_scriptlog "Stopped ${servername}"
fi
# Remove lock file
rm -f "${rootdir}/${lockselfname}"
@ -37,23 +58,83 @@ fn_printdots "${servername}"
fn_scriptlog "${servername}"
sleep 1
fn_check_tmux
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
if [ "${pid}" == "0" ]; then
fn_printfail "${servername} is already stopped"
fn_scriptlog "${servername} is already stopped"
if [ "${gamename}" == "7 Days To Die" ] ; then
# if game is 7 Days To Die, we need special, graceful shutdown via telnet connection.
# Set below variable to be called for expect to operate correctly..
fn_printdots "Attempting graceful shutdown via telnet"
fn_scriptlog "Attempting graceful shutdown via telnet"
sleep 1
telnetip=127.0.0.1
sdtd_telnet
# If failed using localhost will use servers ip
refused=$(echo -en "\n ${sdtdshutdown}"| grep "Timeout or EOF")
if [ -n "${refused}" ]; then
fn_check_ip
telnetip=${ip}
fn_printwarn "Attempting graceful shutdown via telnet: localhost failed"
fn_scriptlog "Warning! Attempting graceful shutdown failed using localhost"
sleep 5
echo -en "\n"
fn_printdots "Attempting graceful shutdown via telnet: using ${telnetip}"
fn_scriptlog "Attempting graceful shutdown via telnet using ${telnetip}"
sdtd_telnet
sleep 1
fi
refused=$(echo -en "\n ${sdtdshutdown}"| grep "Timeout or EOF")
completed=$(echo -en "\n ${sdtdshutdown}"| grep "Completed.")
if [ -n "${refused}" ]; then
fn_printfail "Attempting graceful shutdown via telnet"
fn_scriptlog "Attempting graceful shutdown failed"
fn_scriptlog "${refused}"
elif [ -n "${completed}" ]; then
fn_printok "Attempting graceful shutdown via telnet"
fn_scriptlog "Attempting graceful shutdown succeeded"
else
fn_printfail "Attempting graceful shutdown via telnet: Unknown error"
fn_scriptlog "Attempting graceful shutdown failed"
fn_scriptlog "Unknown error"
fi
sleep 1
echo -en "\n\n"
echo -en "Telnet output:"
echo -en "\n ${sdtdshutdown}"
echo -en "\n\n"
sleep 1
fn_printdots "${servername}"
fn_scriptlog "${servername}"
sleep 5
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
if [ "${pid}" == "0" ]; then
fn_printok "${servername} is already stopped using graceful shutdown"
fn_scriptlog "${servername} is already stopped using graceful shutdown"
else
tmux kill-session -t ${servicename}
fn_printok "${servername}"
fn_scriptlog "Stopped ${servername}"
fi
else
tmux kill-session -t ${servicename}
fn_printok "${servername}"
fn_scriptlog "Stopped ${servername}"
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
if [ "${pid}" == "0" ]; then
fn_printfail "${servername} is already stopped"
fn_scriptlog "${servername} is already stopped"
else
tmux kill-session -t ${servicename}
fn_printok "${servername}"
fn_scriptlog "Stopped ${servername}"
fi
fi
# Remove lock file
rm -f "${rootdir}/${lockselfname}"
sleep 1
echo -en "\n"
sleep 1
echo -en "\n"
}
if [ "${gamename}" == "Teamspeak 3" ]; then
fn_stop_teamspeak3
fn_stop_teamspeak3
else
fn_stop_tmux
fn_stop_tmux
fi

43
functions/fn_update_check

@ -2,7 +2,7 @@
# LGSM fn_update_check function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 150315
# Version: 220415
# Description: Checks if a server update is available.
@ -84,12 +84,13 @@ if [ "${requestrestart}" -ge "1" ]; then
echo -ne "Applying update...\r"
sleep 1
echo -ne "\n"
if [ ! -z "${norestart}" ]; then
fn_update_dl
else
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then
fn_stop
fn_update_dl
fn_start
else
fn_update_dl
fi
else
fn_printok "Checking for update: Server logs: No update requested"
@ -145,12 +146,14 @@ if [ "${currentbuild}" -ne "${availablebuild}" ]; then
fn_scriptlog "Current build: ${currentbuild}"
fn_scriptlog "Available build: ${availablebuild}"
fn_scriptlog "${currentbuild} > ${availablebuild}"
if [ ! -z "${norestart}" ]; then
fn_update_dl
else
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then
fn_stop
fn_update_dl
fn_start
else
fn_update_dl
fi
else
echo -e "\n"
@ -200,17 +203,29 @@ currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egr
ts3arch=$(ls $(find ${filesdir}/ -name 'ts3server_*_*' 2> /dev/null | grep -v 'ts3server_minimal_runscript.sh' | sort | tail -1) | egrep -o '(amd64|x86)' | tail -1)
# Gets availablebuild info
wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers.tmp
# Grabs all version numbers not in correct order
wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp
# removes digits to allow sorting of numbers
cat .ts3_version_numbers_unsort.tmp |tr -cd "[:digit:][*\n]" > .ts3_version_numbers_digit.tmp
# Sorts numbers in to correct order
# merges two files in to one with two columns sorts the numbers in to order then only outputs the second to the ts3_version_numbers.tmp
paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp |sort -rn|awk '{ print $2 }' > .ts3_version_numbers.tmp
# Finds directory with most recent server version.
while read ts3_version_number; do
wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz"
if [[ $? == 0 ]]; then
availablebuild="${ts3_version_number}"
# Break while-loop, if the latest release could be found
echo "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.g"
break
fi
done < .ts3_version_numbers.tmp
rm .ts3_version_numbers.tmp
rm -f .ts3_version_numbers_digit.tmp
rm -f .ts3_version_numbers_unsorted.tmp
rm -f .ts3_version_numbers.tmp
# Checks availablebuild info is available
if [ -z "${availablebuild}" ]; then
@ -268,6 +283,16 @@ fi
fn_printdots "Checking for update"
if [ "${gamename}" == "Teamspeak 3" ]; then
fn_teamspeak3_check
elif [ "${engine}" == "goldsource" ]; then
# Goldsource servers bypass checks as fn_steamcmdcheck does not work for appid 90 servers.
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then
fn_stop
fn_update_dl
fn_start
else
fn_update_dl
fi
else
fn_logupdaterequest
fn_steamcmdcheck

6
functions/fn_update_dl

@ -32,7 +32,7 @@ sleep 1
fn_printoknl "Updating ${servername}"
fn_scriptlog "Updating ${servername}"
sleep 1
cd ${rootdir}
cd "${rootdir}"
echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
fn_scriptlog "Downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz"
wget -N --no-check-certificate /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
@ -55,7 +55,7 @@ else
fi
echo -e "copying to ${filesdir}...\c"
fn_scriptlog "Copying to ${filesdir}"
cp -R ${rootdir}/teamspeak3-server_linux-${ts3arch}/* "${filesdir}" 2> "${scriptlogdir}/.${servicename}-cp-error.tmp"
cp -R "${rootdir}/teamspeak3-server_linux-${ts3arch}/*" "${filesdir}" 2> "${scriptlogdir}/.${servicename}-cp-error.tmp"
local status=$?
if [ ${status} -eq 0 ]; then
echo "OK"
@ -70,7 +70,7 @@ else
exit
fi
rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz
rm -rf ${rootdir}/teamspeak3-server_linux-${ts3arch}
rm -rf "${rootdir}/teamspeak3-server_linux-${ts3arch}"
}
if [ "${gamename}" == "Teamspeak 3" ]; then

20
functions/fn_validate

@ -2,13 +2,13 @@
# LGSM fn_validate function
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
# Version: 150415
# Description: Runs a server validation.
local modulename="Validate"
fn_check_root
fn_check_systemdir
fn_validation(){
fn_printwarn "Validating may overwrite some customised files."
sleep 1
echo -en "\n"
@ -23,4 +23,16 @@ sleep 1
cd "${rootdir}"
cd "steamcmd"
./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}"
fn_scriptlog "Checking complete"
fn_scriptlog "Checking complete"
}
fn_check_root
fn_check_systemdir
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
if [ "${tmuxwc}" -eq 1 ]; then
fn_stop
fn_validation
fn_start
else
fn_validation
fi

BIN
images/icons/centos-icon-32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/icons/debian-icon-32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/icons/ubuntu-icon-32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

3
images/logo/README.md

@ -0,0 +1,3 @@
# LGSM - Official Logos
For Reference the original design can be found here.
http://twolofbees.com/artwork.php?iid=870

BIN
images/logo/assets/lgsm-font-pt_sans.zip

Binary file not shown.

BIN
images/logo/assets/lgsm-square.xcf

Binary file not shown.

BIN
images/logo/assets/lgsm.xcf

Binary file not shown.

BIN
images/logo/assets/lgsm_full.xcf

Binary file not shown.

BIN
images/logo/lgsm-250x143-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/logo/lgsm-250x143-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/logo/lgsm-full-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
images/logo/lgsm-full-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
images/logo/lgsm-site-foot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/logo/lgsm-site-head.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
images/logo/lgsm-square-114-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
images/logo/lgsm-square-114-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/logo/lgsm-square-16-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

BIN
images/logo/lgsm-square-16-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

BIN
images/logo/lgsm-square-184-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
images/logo/lgsm-square-184-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
images/logo/lgsm-square-24-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/logo/lgsm-square-24-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/logo/lgsm-square-32-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/logo/lgsm-square-32-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

BIN
images/logo/lgsm-square-512-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/logo/lgsm-square-512-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/logo/lgsm-square-64-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/logo/lgsm-square-64-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/screens/Tmux.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Loading…
Cancel
Save