@@ -2,7 +2,7 @@
# LGSM fn_backup function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
-# Version: 311015
+lgsm_version="061115"
# Description: Creates a .tar.gz file in the backup directory.
@@ -58,4 +58,4 @@ sleep 1
echo ""
fn_printcompletenl "Complete."
fn_scriptlog "Complete"
-echo ""
+echo ""
# LGSM fn_check_ip function
# 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".
@@ -2,7 +2,8 @@
# LGSM fn_check_logs function
-# Version: 190515
+
# Description: Checks that log files exist on server start
# Create dir's for the script and console logs
@@ -13,4 +14,4 @@ if [ ! -d "${scriptlogdir}" ]; then
echo -en "\n"
checklogs=1
fn_install_logs
-fi
+fi
@@ -2,9 +2,9 @@
# LGSM fn_check_root function
if [ $(whoami) = "root" ]; then
fn_printfailnl "Do NOT run this script as root!"
exit 1
# LGSM fn_check_steamcmd function
-# Version: 210115
# Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD
# LGSM fn_check_steamuser function
-# Version: 040715
if [ "${steamuser}" == "username" ]; then
fn_printfailnl "Steam login not set. Update steamuser."
# LGSM fn_check_systemdir function
if [ ! -e "${systemdir}" ]; then
fn_printfailnl "Cannot access ${systemdir}: No such directory"
# LGSM fn_check_tmux function
# Checks if tmux is installed as too many users do not RTFM or know how to use Google.
@@ -17,4 +17,4 @@ else
echo " * Please see the the following link."
echo " * http://gameservermanagers.com/tmux-not-found"
exit 127
# LGSM fn_check_ts3status function
-# Version: 070215
# Checks the status of Teamspeak 3.
cd "${executabledir}"
-ts3status=$(./ts3server_startscript.sh status servercfgfullpathfile=${servercfgfullpath})
+ts3status=$(./ts3server_startscript.sh status servercfgfullpathfile=${servercfgfullpath})
# LGSM fn_compress_unreal2maps function
fn_check_root
clear
# LGSM fn_compress_ut99maps function
# LGSM fn_console function
# Description: Gives access to the server tmux console.
# LGSM fn_csgofix function
# Description: Resolves various issues with csgo.
# LGSM fn_debug function
-# Version: 051115
# Description: Runs the server without tmux. Runs direct from the terminal.
# LGSM fn_dep_detect function
-# Version: 290615
# Description: Detects dependencies the server binary requires.
# LGSM fn_details function
-# Version: 011115
# Description: Displays server infomation.
# LGSM fn_details_config function
-# Version: 301015
# Description: Gets specific details from config files.
# LGSM fn_details_distro function
# Description: Variables providing useful info on the Operating System such as disk and performace info.
# Used for fn_details, fn_debug and fn_email.
# LGSM fn_details_glibc function
-# Version: 180715
# Description: stores details on servers Glibc requirements.
# LGSM fn_email function
-# Version: 290815
# Description: Sends email notification if monitor picks up a failure.
# LGSM fn_email_test function
# Description: Sends a test email notification.
# LGSM fn_functions function
-# Version: 091215
# 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.
# LGSM fn_getopt function
# Description: getopt arguments.
# LGSM fn_insfix function
-# Version: 110415
+lgsm_version="110415"
# Description: Resolves ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory
# LGSM fn_install function
fn_install_header
# LGSM fn_install_complete function
-# Version: 070715
if [ "${gamename}" == "Dont Starve Together" ]; then
# LGSM fn_install_config function
fn_defaultconfig(){
echo "creating ${servercfg} config file."
# LGSM fn_install_glibcfix function
fn_glibcfixmsg(){
# LGSM fn_install_gslt function
+lgsm_version="091215"
# Description: Configures GSLT.
# LGSM fn_install_gsquery function
fn_dlgsquery(){
cd "${rootdir}"
# LGSM fn_install_header function
echo "================================="
# LGSM fn_install_kffix function
-# Version: 150515
echo "Applying ${gamename} Server Fixes"
# LGSM fn_install_logs function
-# Version: 281015
if [ "${checklogs}" != "1" ]; then
# LGSM fn_install_retry function
while true; do
read -e -i "y" -p "Retry install? [Y/n]" yn
# LGSM fn_install_rofix function
# LGSM fn_install_serverdir function
-# Version: 240515
echo "Server Directory"
# LGSM fn_install_serverfiles function
fn_steaminstallcommand(){
fn_check_steamuser
# LGSM fn_install_steamfix function
fn_steamclientfix(){
# LGSM fn_install_ts3 function
fn_details_distro
# Gets the teamspeak server architecture
# LGSM fn_install_ut2k4 function
echo "Installing ${gamename} Server"
# LGSM fn_install_ut2k4filesdl function
echo "Downloading Server Files"
# LGSM fn_install_ut2k4fix function
# LGSM fn_install_ut2k4key function
echo "Enter ${gamename} CD Key"
# LGSM fn_install_ut99 function
# LGSM fn_install_ut99filesdl function
# LGSM fn_install_ut99fix function
# LGSM fn_logs function
-# Version: 030715
# Description: Acts as a log rotater, removing old logs.
# LGSM fn_messages function
# Description: Defines on-screen messages such as [ OK ] and how script logs look.
# LGSM fn_monitor function
# Description: Monitors server by checking for running proccesses
# then passes to fn_monitor_query.
# LGSM fn_monitor_query function
# Description: uses gsquery.py to directly query the server.
# Detects if the server has frozen.
# LGSM fn_start function
# Description: Starts the server.
# LGSM fn_stop function
-# Version: 261015
# Description: Stops the server.
# LGSM fn_update_check function
# Description: Checks if a server update is available.
# LGSM fn_update_dl function
# Description: Runs a server update.
# LGSM fn_update_functions function
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
# LGSM fn_validate function
# Description: Runs a server validation.