Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into development

# Conflicts:
#	FistfulOfFrags/cfg/lgsm-default.cfg
pull/1026/head
Daniel Gibbs 9 years ago
parent
commit
31dbb04b42
  1. 4
      7DaysToDie/sdtdserver
  2. 6
      ARKSurvivalEvolved/arkserver
  3. 4
      Arma3/arma3server
  4. 141
      Battlefield1942/bf1942server
  5. 4
      BlackMesa/bmdmserver
  6. 4
      BladeSymphony/bsserver
  7. 4
      BrainBread2/bb2server
  8. 4
      CodenameCURE/ccserver
  9. 4
      CounterStrike/csserver
  10. 4
      CounterStrikeConditionZero/csczserver
  11. 4
      CounterStrikeGlobalOffensive/csgoserver
  12. 11
      CounterStrikeSource/cssserver
  13. 4
      DayOfDefeat/dodserver
  14. 4
      DayOfDefeatSource/dodsserver
  15. 4
      DayOfInfamy/doiserver
  16. 4
      DeathmatchClassic/dmcserver
  17. 4
      DontStarveTogether/dstserver
  18. 4
      DoubleActionBoogaloo/dabserver
  19. 4
      EmpiresMod/emserver
  20. 125
      EnemyTerritory/cfg/lgsm-default.cfg
  21. 143
      EnemyTerritory/etserver
  22. 8
      FistfulOfFrags/cfg/lgsm-default.cfg
  23. 4
      FistfulOfFrags/fofserver
  24. 4
      GarrysMod/gmodserver
  25. 4
      GoldenEyeSource/gesserver
  26. 4
      HalfLife2Deathmatch/hl2dmserver
  27. 4
      HalfLifeDeathmatch/hldmserver
  28. 4
      HalfLifeDeathmatchSource/hldmsserver
  29. 4
      Hurtworld/hwserver
  30. 4
      Insurgency/insserver
  31. 4
      JustCause2/jc2server
  32. 4
      KillingFloor/kfserver
  33. 4
      Left4Dead/l4dserver
  34. 4
      Left4Dead2/l4d2server
  35. 40
      Minecraft/cfg/lgsm-default.ini
  36. 142
      Minecraft/mcserver
  37. 4
      Mumble/mumbleserver
  38. 4
      NS2Combat/ns2cserver
  39. 4
      NaturalSelection2/ns2server
  40. 4
      NoMoreRoomInHell/nmrihserver
  41. 4
      OpposingForce/opforserver
  42. 4
      PiratesVikingandKnightsII/pvkiiserver
  43. 4
      ProjectZomboid/pzserver
  44. 4
      QuakeLive/qlserver
  45. 22
      README.md
  46. 4
      RedOrchestra/roserver
  47. 4
      Ricochet/ricochetserver
  48. 2
      Rust/cfg/lgsm-default.cfg
  49. 4
      Rust/rustserver
  50. 6
      SeriousSam3BFE/ss3sserver
  51. 4
      Starbound/sbserver
  52. 4
      SvenCoop/svencoopserver
  53. 4
      TeamFortress2/tf2server
  54. 4
      TeamFortressClassic/tfcserver
  55. 4
      TeamSpeak3/ts3server
  56. 4
      Teeworlds/twserver
  57. 4
      Terraria/terrariaserver
  58. 3
      UnrealTournament/cfg/Engine.ini
  59. 4
      UnrealTournament/cfg/Game.ini
  60. 147
      UnrealTournament/utserver
  61. 4
      UnrealTournament2004/ut2k4server
  62. 155
      UnrealTournament3/ut3server
  63. 4
      UnrealTournament99/ut99server
  64. 4
      functions/core_functions.sh
  65. 33
      lgsm/functions/check_deps.sh
  66. 2
      lgsm/functions/check_glibc.sh
  67. 4
      lgsm/functions/check_ip.sh
  68. 49
      lgsm/functions/check_permissions.sh
  69. 2
      lgsm/functions/check_steamcmd.sh
  70. 5
      lgsm/functions/check_system_requirements.sh
  71. 22
      lgsm/functions/command_details.sh
  72. 4
      lgsm/functions/command_fastdl.sh
  73. 2
      lgsm/functions/command_install.sh
  74. 36
      lgsm/functions/command_stop.sh
  75. 2
      lgsm/functions/command_ts3_server_pass.sh
  76. 2
      lgsm/functions/command_update.sh
  77. 6
      lgsm/functions/core_dl.sh
  78. 14
      lgsm/functions/core_functions.sh
  79. 92
      lgsm/functions/core_getopt.sh
  80. 10
      lgsm/functions/core_messages.sh
  81. 6
      lgsm/functions/fix.sh
  82. 14
      lgsm/functions/fix_ut.sh
  83. 53
      lgsm/functions/info_config.sh
  84. 8
      lgsm/functions/info_distro.sh
  85. 18
      lgsm/functions/info_glibc.sh
  86. 74
      lgsm/functions/install_config.sh
  87. 2
      lgsm/functions/install_gslt.sh
  88. 33
      lgsm/functions/install_minecraft_eula.sh
  89. 13
      lgsm/functions/install_server_files.sh
  90. 157
      lgsm/functions/update_minecraft.sh
  91. 2
      lgsm/functions/update_mumble.sh
  92. 2
      lgsm/functions/update_ts3.sh
  93. 4
      tests/tests_jc2server.sh
  94. 4
      tests/tests_ts3server.sh

4
7DaysToDie/sdtdserver

@ -43,8 +43,8 @@ parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

6
ARKSurvivalEvolved/arkserver

@ -40,7 +40,7 @@ ip="0.0.0.0"
updateonstart="off" updateonstart="off"
fn_parms(){ fn_parms(){
parms="TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}" parms="\"TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}\""
} }
#### Advanced Variables #### #### Advanced Variables ####
@ -48,8 +48,8 @@ parms="TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${m
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Arma3/arma3server

@ -59,8 +59,8 @@ bepath=""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

141
Battlefield1942/bf1942server

@ -0,0 +1,141 @@
#!/bin/bash
# Battlefield: 1942
# Server Management Script
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="210516"
#### Variables ####
# Notification Alerts
# (on|off)
# Email
emailalert="off"
email="[email protected]"
# Pushbullet
# https://www.pushbullet.com/#settings
pushbulletalert="off"
pushbullettoken="accesstoken"
# Start Variables
ip="0.0.0.0"
fn_parms(){
parms=" +hostServer 1 +dedicated 1"
}
#### Advanced Variables ####
# Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="dgibbs64"
githubrepo="linuxgsm"
githubbranch="master"
# Server Details
servicename="bf1942-server"
gamename="Battlefield: 1942"
engine="refractor"
# Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${systemdir}"
executable="./start.sh"
servercfg="serversettings.con"
servercfgdir="${systemdir}/mods/bf1942/settings"
servercfgfullpath="${servercfgdir}/${servercfg}"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${filesdir}/Logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
consolelogging="on"
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
# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}"
fi
echo -e " fetching ${filename}...\c"
# Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths}
do
if [ -x "${curlcmd}" ]; then
break
fi
done
# If curl exists download file
if [ "$(basename ${curlcmd})" == "curl" ]; then
curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n"
echo "${curlfetch}"
echo -e "${githuburl}\n"
exit 1
else
echo -e "\e[0;32mOK\e[0m"
fi
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!"
echo -e ""
exit 1
fi
chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}
core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

4
BlackMesa/bmdmserver

@ -53,8 +53,8 @@ parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
BladeSymphony/bsserver

@ -48,8 +48,8 @@ parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
BrainBread2/bb2server

@ -53,8 +53,8 @@ parms="-game brainbread2 -insecure -strictportbind -ip ${ip} -port ${port} +clie
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
CodenameCURE/ccserver

@ -48,8 +48,8 @@ parms="-game cure -insecure -strictportbind -ip ${ip} -port ${port} +clientport
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
CounterStrike/csserver

@ -47,8 +47,8 @@ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clien
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
CounterStrikeConditionZero/csczserver

@ -47,8 +47,8 @@ parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
CounterStrikeGlobalOffensive/csgoserver

@ -71,8 +71,8 @@ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport $
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

11
CounterStrikeSource/cssserver

@ -38,9 +38,14 @@ clientport="27005"
ip="0.0.0.0" ip="0.0.0.0"
updateonstart="off" updateonstart="off"
# Required: Game Server Login Token
# GSLT is required for running a public server.
# More info: https://gameservermanagers.com/gslt
gslt=""
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){ fn_parms(){
parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
} }
#### Advanced Variables #### #### Advanced Variables ####
@ -48,8 +53,8 @@ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clien
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DayOfDefeat/dodserver

@ -47,8 +47,8 @@ parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DayOfDefeatSource/dodsserver

@ -48,8 +48,8 @@ parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DayOfInfamy/doiserver

@ -50,8 +50,8 @@ parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DeathmatchClassic/dmcserver

@ -47,8 +47,8 @@ parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DontStarveTogether/dstserver

@ -46,8 +46,8 @@ parms="-console -cluster MyDediServer -shard Master"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
DoubleActionBoogaloo/dabserver

@ -48,8 +48,8 @@ parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_por
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
EmpiresMod/emserver

@ -53,8 +53,8 @@ parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clien
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

125
EnemyTerritory/cfg/lgsm-default.cfg

@ -0,0 +1,125 @@
set dedicated "2" // 1: dedicated server for lan 2: dedicated server for internet
// set net_ip "" // set to override the default IP ET uses
// set net_port "27960" // set to override the default port ET uses
// PASSWORDS & CLIENTS
set sv_maxclients "20" // number of players including private slots
set g_password "" // set to password protect the server
set sv_privateclients "4" // if set > 0, then this number of client slots will be reserved for connections
set sv_privatepassword "" // that have "password" set to the value of "sv_privatePassword"
set rconpassword "<rconpassword>" // remote console access password
set refereePassword "" // referee status password
// DL, RATE
set sv_maxRate "13000" // 10000 standard but poor for ET
set sv_dl_maxRate "42000" // increase/decerease if you have plenty/little spare bandwidth
set sv_allowDownload "0" // global toggle for both legacy download and web download
set sv_wwwDownload "0" // toggle to enable web download
set sv_wwwBaseURL "" // base URL for redirection
set sv_wwwDlDisconnected "0" // tell clients to perform their downloads while disconnected from the server
set sv_wwwFallbackURL "" // URL to send to if an http/ftp fails or is refused client side
// MOTD ETC
set sv_hostname "<hostname>" // name of server here
set server_motd0 " ^NEnemy Territory ^7MOTD " // message in right corner of join screen here
set server_motd1 ""
set server_motd2 ""
set server_motd3 ""
set server_motd4 ""
set server_motd5 ""
// MISC SETTINGS
set g_heavyWeaponRestriction "100"
set g_antilag "1"
set g_altStopwatchMode "0"
set g_autofireteams "1"
set g_complaintlimit "6"
set g_ipcomplaintlimit "3"
set g_fastres "0"
set g_friendlyFire "1"
//set g_gametype "4" // Game type should be set from map rotation script
set g_minGameClients "8"
set g_maxlives "0"
set g_alliedmaxlives "0"
set g_axismaxlives "0"
set g_teamforcebalance "1"
set g_noTeamSwitching "0"
set g_voiceChatsAllowed "4"
set g_doWarmup "0"
set g_warmup "30"
set g_spectatorInactivity "0"
set sv_floodProtect "1"
set sv_allowDownload "1"
set sv_pure "1"
set sv_minping "0"
set sv_maxping "0"
set match_latejoin "1"
set match_minplayers "4"
set match_mutespecs "0"
set match_readypercent "100"
set match_timeoutcount "0"
set match_warmupDamage "1"
set team_maxplayers "0"
set team_nocontrols "1"
set pmove_fixed "0"
set pmove_msec "8"
// LMS ONLY SETTINGS
set g_lms_teamForceBalance "1"
set g_lms_roundlimit "3"
set g_lms_matchlimit "2"
set g_lms_currentMatch "0"
set g_lms_lockTeams "0"
set g_lms_followTeamOnly "1"
// VOTING
set g_allowVote "1"
set vote_limit "5"
set vote_percent "50"
set vote_allow_comp "1"
set vote_allow_gametype "1"
set vote_allow_kick "1"
set vote_allow_map "1"
set vote_allow_matchreset "1"
set vote_allow_mutespecs "1"
set vote_allow_nextmap "1"
set vote_allow_pub "1"
set vote_allow_referee "0"
set vote_allow_shuffleteams "1"
set vote_allow_swapteams "1"
set vote_allow_friendlyfire "1"
set vote_allow_timelimit "0"
set vote_allow_warmupdamage "1"
set vote_allow_antilag "1"
set vote_allow_balancedteams "1"
set vote_allow_muting "1"
// PUNKBUSTER
// sv_punkbuster is a readonly variable. Use +set sv_punkbuster on command line or use the command pb_sv_enable in the console
//pb_sv_enable
// LOGGING
set g_log "etserver.log" // Game logging
set g_logsync 0
set logfile 0 // Console logging ( 1: enable 2: enable and sync )
// MAP ROTATION
exec campaigncycle.cfg // Campaign mode
//exec objectivecycle.cfg // Objective mode
//exec lmscycle.cfg // Last Man Standing mode
// WATCHDOG
// in case the game dies with an ERR_DROP
// or any situation leading to server running with no map
//set com_watchdog 10 // defaults 60
set com_watchdog_cmd "exec campaigncycle.cfg" // defaults to quit

143
EnemyTerritory/etserver

@ -0,0 +1,143 @@
#!/bin/bash
# Enemy Territory
# Server Management Script
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="210516"
#### Variables ####
# Notification Alerts
# (on|off)
# Email
emailalert="off"
email="[email protected]"
# Pushbullet
# https://www.pushbullet.com/#settings
pushbulletalert="off"
pushbullettoken="accesstoken"
# Start Variables
ip="0.0.0.0"
port="27960"
fn_parms(){
parms="+set net_strict 1 +set net_ip ${ip} +set net_port ${port} +set fs_homepath ${filesdir} +exec ${servicename}.cfg"
}
#### Advanced Variables ####
# Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"
# Server Details
servicename="et-server"
gamename="Enemy Territory"
engine="idtech3"
# Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${systemdir}"
executable="./etded"
servercfg="${servicename}.cfg"
servercfgdir="${systemdir}/etmain"
servercfgfullpath="${servercfgdir}/${servercfg}"
servercfgdefault="${servercfgdir}/lgsm-default.cfg"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${filesdir}/Logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
consolelogging="on"
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
# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}"
fi
echo -e " fetching ${filename}...\c"
# Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths}
do
if [ -x "${curlcmd}" ]; then
break
fi
done
# If curl exists download file
if [ "$(basename ${curlcmd})" == "curl" ]; then
curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n"
echo "${curlfetch}"
echo -e "${githuburl}\n"
exit 1
else
echo -e "\e[0;32mOK\e[0m"
fi
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!"
echo -e ""
exit 1
fi
chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}
core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

8
FistfulOfFrags/cfg/lgsm-default.cfg

@ -1,7 +1,7 @@
// **************************************************************************** // ****************************************************************************
// * // *
// Fistful of Frags - server.cfg * // Fistful of Frags - server.cfg *
// Version 100116 * // Version 240716 *
// * // *
// **************************************************************************** // ****************************************************************************
@ -25,7 +25,7 @@ sv_lan 0
// ............................... Map Cycles ............................... // // ............................... Map Cycles ............................... //
// info: There are several predefined mapcycles available that are listed below. // info: There are several predefined mapcycles available that are listed below.
// You can also create your own custom mapcycle. // You can also create your own custom mapcycle.
// "mapcycle.txt" - All Shootout/2 Team Shootout/4 Team Shootout maps // "mapcycle.txt" - All Shootout/2 Team Shootout/4 Team Shootout maps
// "mapcycle_12.txt" - All 12 slot maps for Shootout/2 Team Shootout/4 Team Shootout // "mapcycle_12.txt" - All 12 slot maps for Shootout/2 Team Shootout/4 Team Shootout
@ -50,7 +50,7 @@ mp_timelimit 15
// 3 = Break Bad // 3 = Break Bad
// 4 = Elimination // 4 = Elimination
// 5 = Versus // 5 = Versus
fof_sv_currentmode 1 fof_sv_currentmode 1
// Teamplay // Teamplay
// 0 = Free-for-all // 0 = Free-for-all
@ -98,7 +98,7 @@ sv_downloadurl ""
// personal banlist based on user IDs. // personal banlist based on user IDs.
exec banned_user.cfg exec banned_user.cfg
// personal banlist based on user IPs. // personal banlist based on user IPs.
exec banned_ip.cfg exec banned_ip.cfg
writeid writeid

4
FistfulOfFrags/fofserver

@ -48,8 +48,8 @@ parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
GarrysMod/gmodserver

@ -69,8 +69,8 @@ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickr
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
GoldenEyeSource/gesserver

@ -49,8 +49,8 @@ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clie
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam - 2007 SDK # Steam - 2007 SDK

4
HalfLife2Deathmatch/hl2dmserver

@ -48,8 +48,8 @@ parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
HalfLifeDeathmatch/hldmserver

@ -47,8 +47,8 @@ parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
HalfLifeDeathmatchSource/hldmsserver

@ -48,8 +48,8 @@ parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Hurtworld/hwserver

@ -62,8 +62,8 @@ parms="-batchmode -nographics -exec \"host ${port} ${map} ${loadsave};queryport
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Insurgency/insserver

@ -50,8 +50,8 @@ parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${cl
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
JustCause2/jc2server

@ -42,8 +42,8 @@ parms=""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
KillingFloor/kfserver

@ -47,8 +47,8 @@ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Left4Dead/l4dserver

@ -48,8 +48,8 @@ parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${cli
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Left4Dead2/l4d2server

@ -47,8 +47,8 @@ parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${cl
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

40
Minecraft/cfg/lgsm-default.ini

@ -0,0 +1,40 @@
#Minecraft server properties (LGSM 210516)
#Sat Aug 20 17:30:15 CEST 2016
allow-flight=false
allow-nether=true
announce-player-achievements=true
difficulty=1
enable-command-block=false
enable-query=false
enable-rcon=false
force-gamemode=false
gamemode=0
generate-structures=true
generator-settings=
hardcore=false
level-name=world
level-seed=
level-type=DEFAULT
max-build-height=256
max-players=20
max-tick-time=60000
max-world-size=29999984
motd=A Minecraft Server
network-compression-threshold=256
online-mode=true
op-permission-level=4
player-idle-timeout=0
pvp=true
rcon.password=
rcon.port=25575
resource-pack-sha1=
resource-pack=
server-ip=
server-port=25565
snooper-enabled=true
spawn-animals=true
spawn-monsters=true
spawn-npcs=true
use-native-transport=true
view-distance=10
white-list=false

142
Minecraft/mcserver

@ -0,0 +1,142 @@
#!/bin/bash
# Minecraft
# Server Management Script
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="210816"
#### Variables ####
# Notification Alerts
# (on|off)
# Email
emailalert="off"
email="[email protected]"
# Pushbullet
# https://www.pushbullet.com/#settings
pushbulletalert="off"
pushbullettoken="accesstoken"
# Start Variables
updateonstart="off"
javaram="1024" # -Xmx$1024M
fn_parms(){
parms="nogui"
}
#### Advanced Variables ####
# Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"
# Server Details
servicename="mc-server"
gamename="Minecraft"
engine="lwjgl2"
# Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"
executable="java -Xmx${javaram}M -jar minecraft_server.jar"
servercfg="server.properties"
servercfgdir="${filesdir}"
servercfgfullpath="${servercfgdir}/${servercfg}"
servercfgdefault="${servercfgdir}/lgsm-default.ini"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
consolelogging="on"
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
# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}"
fi
echo -e " fetching ${filename}...\c"
# Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths}
do
if [ -x "${curlcmd}" ]; then
break
fi
done
# If curl exists download file
if [ "$(basename ${curlcmd})" == "curl" ]; then
curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n"
echo "${curlfetch}"
echo -e "${githuburl}\n"
exit 1
else
echo -e "\e[0;32mOK\e[0m"
fi
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!"
echo -e ""
exit 1
fi
chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}
core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

4
Mumble/mumbleserver

@ -38,8 +38,8 @@ parms="-fg -ini ${servercfgfullpath}"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"

4
NS2Combat/ns2cserver

@ -55,8 +55,8 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
NaturalSelection2/ns2server

@ -55,8 +55,8 @@ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
NoMoreRoomInHell/nmrihserver

@ -53,8 +53,8 @@ parms="-game nmrih -insecure -strictportbind -ip ${ip} -port ${port} +clientport
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
OpposingForce/opforserver

@ -47,8 +47,8 @@ parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clien
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
PiratesVikingandKnightsII/pvkiiserver

@ -48,8 +48,8 @@ parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientp
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
ProjectZomboid/pzserver

@ -44,8 +44,8 @@ parms="-ip ${ip} -adminpassword \"${adminpassword}\""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
QuakeLive/qlserver

@ -51,8 +51,8 @@ fn_parms(){
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

22
README.md

@ -1,8 +1,8 @@
<h1>Linux Game Server Managers_</h1> <h1>Linux Game Server Managers_</h1>
<a href="https://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> <a href="https://gameservermanagers.com"><img src="https://github.com/GameServerManagers/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) [![Build Status](https://travis-ci.org/GameServerManagers/LinuxGSM.svg?branch=master)](https://travis-ci.org/GameServerManagers/LinuxGSM)
[![Under Development](https://badge.waffle.io/dgibbs64/linuxgsm.svg?label=Under%20Development&title=Under%20Development)](http://waffle.io/dgibbs64/linuxgsm) [![Under Development](https://badge.waffle.io/GameServerManagers/LinuxGSM.svg?label=Under%20Development&title=Under%20Development)](http://waffle.io/GameServerManagers/LinuxGSM)
The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice alert servers. The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice alert servers.
@ -29,25 +29,25 @@ 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. Other distros are likely to work but are not fully tested.
<h3>Specific Requirements</h3> <h3>Specific Requirements</h3>
<ul> <ul>
<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/GameServerManagers/LinuxGSM/wiki/Glibc">GLIBC</a> >= 2.15 recommended [<a href="https://github.com/GameServerManagers/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> <li><a href="https://github.com/GameServerManagers/LinuxGSM/wiki/Tmux">Tmux</a> >= 1.6 recommended (Avoid Tmux 1.8).</li>
</ul> </ul>
<h2>FAQ</h2> <h2>FAQ</h2>
All FAQ can be found here. All FAQ can be found here.
<a href="https://github.com/dgibbs64/linuxgsm/wiki/FAQ">https://github.com/dgibbs64/linuxgsm/wiki/FAQ</a> <a href="https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ">https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ</a>
<h2>Donate</h2> <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 their support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers! If you want to donate to the project you can via PayPal. I have had a may kind people show their support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
<ul> <ul>
<li><a href="https://gameservermanagers.com/#donate">Donate</a></li> <li><a href="https://gameservermanagers.com/#donate">Donate</a></li>
</ul> </ul>
<h2>Useful Links</h2> <h2>Useful Links</h2>
<ul> <ul>
<li><a href="https://gameservermanagers.com">Homepage</a></li> <li><a href="https://gameservermanagers.com">Homepage</a></li>
<li><a href="https://github.com/dgibbs64/linuxgsm/wiki">Wiki</a></li> <li><a href="https://github.com/GameServerManagers/LinuxGSM/wiki">Wiki</a></li>
<li><a href="https://github.com/dgibbs64/linuxgsm">GitHub Code</a></li> <li><a href="https://github.com/GameServerManagers/LinuxGSM">GitHub Code</a></li>
<li><a href="https://github.com/dgibbs64/linuxgsm/issues">GitHub Issues</a></li> <li><a href="https://github.com/GameServerManagers/LinuxGSM/issues">GitHub Issues</a></li>
<li><a href="https://waffle.io/dgibbs64/linuxgsm">Waffle (Github Dashboard)</a></li> <li><a href="https://waffle.io/GameServerManagers/LinuxGSM">Waffle (Github Dashboard)</a></li>
<li><a href="http://alternativeto.net/software/linux-game-server-managers/">alternativeTo.net</a></li> <li><a href="http://alternativeto.net/software/linux-game-server-managers/">alternativeTo.net</a></li>
</ul> </ul>
<h2>Social</h2> <h2>Social</h2>

4
RedOrchestra/roserver

@ -43,8 +43,8 @@ parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir in
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Server Details # Server Details

4
Ricochet/ricochetserver

@ -47,8 +47,8 @@ parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clie
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

2
Rust/cfg/lgsm-default.cfg

@ -11,7 +11,7 @@
server.description "LGSM Server\nRust support : UltimateByte" server.description "LGSM Server\nRust support : UltimateByte"
# A URL to the image which shows up on the server details screen (dimensions are 512x256). # A URL to the image which shows up on the server details screen (dimensions are 512x256).
server.headerimage "https://github.com/dgibbs64/linuxgsm/raw/master/images/logo/lgsm-full-light.png" server.headerimage "https://github.com/GameServerManagers/LinuxGSM/raw/master/images/logo/lgsm-full-light.png"
# The URL to your servers website. # The URL to your servers website.
server.url "https://gameservermanagers.com/" server.url "https://gameservermanagers.com/"

4
Rust/rustserver

@ -65,8 +65,8 @@ fi
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

6
SeriousSam3BFE/ss3sserver

@ -33,7 +33,7 @@ steampass=""
ip="0.0.0.0" ip="0.0.0.0"
updateonstart="off" updateonstart="off"
# https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt # https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt
fn_parms(){ fn_parms(){
parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}" parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}"
} }
@ -43,8 +43,8 @@ parms="+ip ${ip} +logfile ${gamelog} +exec ${servercfgfullpath}"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Starbound/sbserver

@ -42,8 +42,8 @@ parms=""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
SvenCoop/svencoopserver

@ -47,8 +47,8 @@ parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clie
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
TeamFortress2/tf2server

@ -53,8 +53,8 @@ parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
TeamFortressClassic/tfcserver

@ -47,8 +47,8 @@ parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientpor
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
TeamSpeak3/ts3server

@ -63,8 +63,8 @@ scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S'
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
##### Script ##### ##### Script #####

4
Teeworlds/twserver

@ -43,8 +43,8 @@ parms="-f ${servercfgfullpath}"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

4
Terraria/terrariaserver

@ -43,8 +43,8 @@ parms="-config ${servercfgfullpath}"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Steam # Steam

3
UnrealTournament/cfg/Engine.ini

@ -0,0 +1,3 @@
[/Script/UnrealTournament.UTGameEngine]
bFirstRun=False
RconPassword="<rconpassword>"

4
UnrealTournament/cfg/Game.ini

@ -0,0 +1,4 @@
[/Script/UnrealTournament.UTGameState]
ServerName="<hostname>"
ServerMOTD=<UT.Font.NormalText.Huge>WELCOME</>\n\n<UT.Font.NormalText.Medium>Headshots for everyone.</>
ServerDescription=This is my server, have fun

147
UnrealTournament/utserver

@ -0,0 +1,147 @@
#!/bin/bash
# Unreal Tournament
# Server Management Script
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="210516"
#### Variables ####
# Notification Alerts
# (on|off)
# Email
emailalert="off"
email="[email protected]"
# Pushbullet
# https://www.pushbullet.com/#settings
pushbulletalert="off"
pushbullettoken="accesstoken"
# Start Variables
defaultmap="DM-Underland"
gametype="DM"
#defaultmap="CTF-Face"
#gametype="CTF"
timelimit="10"
ip="0.0.0.0"
port="7777"
fn_parms(){
parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}"
}
#### Advanced Variables ####
# Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"
# Server Details
servicename="ut-server"
gamename="Unreal Tournament"
engine="unreal4"
# Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/LinuxServer"
executabledir="${systemdir}/Engine/Binaries/Linux"
executable="./UE4Server-Linux-Shipping"
servercfg="Game.ini"
servercfgdir="${systemdir}/UnrealTournament/Saved/Config/LinuxServer"
servercfgfullpath="${servercfgdir}/${servercfg}"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${filesdir}/Logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
consolelogging="on"
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
# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}"
fi
echo -e " fetching ${filename}...\c"
# Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths}
do
if [ -x "${curlcmd}" ]; then
break
fi
done
# If curl exists download file
if [ "$(basename ${curlcmd})" == "curl" ]; then
curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n"
echo "${curlfetch}"
echo -e "${githuburl}\n"
exit 1
else
echo -e "\e[0;32mOK\e[0m"
fi
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!"
echo -e ""
exit 1
fi
chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}
core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

4
UnrealTournament2004/ut2k4server

@ -75,8 +75,8 @@ consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
##### Script ##### ##### Script #####

155
UnrealTournament3/ut3server

@ -0,0 +1,155 @@
#!/bin/bash
# Unreal Tournament 3
# Server Management Script
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
if [ -f ".dev-debug" ]; then
exec 5>dev-debug.log
BASH_XTRACEFD="5"
set -x
fi
version="210516"
#### Variables ####
# Notification Alerts
# (on|off)
# Email
emailalert="off"
email="[email protected]"
# Pushbullet
# https://www.pushbullet.com/#settings
pushbulletalert="off"
pushbullettoken="accesstoken"
# Start Variables
ip="0.0.0.0"
port="7777"
queryport="25300"
defaultmap="VCTF-Suspense"
game="UTGameContent.UTVehicleCTFGame_Content"
mutators="" #"UTGame.UTMutator_Instagib,UTGame.UTMutator_LowGrav"
isdedicated="true"
islanmatch="false"
usesstats="false"
shouldadvertise="true"
pureserver="1"
allowjoininprogress="true"
maxplayers="32"
#list of game types and mutators : http://wiki.unrealadmin.org/FAQ:UT3
fn_parms(){
parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?MaxPlayers=${maxplayers}?Mutator=${mutators} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}"
}
# Server Details
servicename="ut3-server"
gamename="Unreal Tournament 3"
engine="unreal3"
# Directories
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${systemdir}/Binaries"
executable="./ut3"
servercfg="UTGame.ini"
servercfgdir="${systemdir}/UTGame/Config"
servercfgfullpath="${servercfgdir}/${servercfg}"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${rootdir}/log/server"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
consolelogging="on"
gamelog="${gamelogdir}/${servicename}-game.log"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').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"
# Github Branch Select
# Allows for the use of different function files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
githubbranch="master"
##### Script #####
# Do not edit
# Fetches core_dl for file downloads
fn_fetch_core_dl(){
github_file_url_dir="lgsm/functions"
github_file_url_name="${functionfile}"
filedir="${functionsdir}"
filename="${github_file_url_name}"
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If the file is missing, then download
if [ ! -f "${filedir}/${filename}" ]; then
if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}"
fi
echo -e " fetching ${filename}...\c"
# Check curl exists and use available path
curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
for curlcmd in ${curlpaths}
do
if [ -x "${curlcmd}" ]; then
break
fi
done
# If curl exists download file
if [ "$(basename ${curlcmd})" == "curl" ]; then
curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n"
echo "${curlfetch}"
echo -e "${githuburl}\n"
exit 1
else
echo -e "\e[0;32mOK\e[0m"
fi
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!"
echo -e ""
exit 1
fi
chmod +x "${filedir}/${filename}"
fi
source "${filedir}/${filename}"
}
core_dl.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_functions.sh(){
# Functions are defined in core_functions.sh.
functionfile="${FUNCNAME}"
fn_fetch_core_dl
}
core_dl.sh
core_functions.sh
getopt=$1
core_getopt.sh

4
UnrealTournament99/ut99server

@ -38,8 +38,8 @@ parms="server ${defaultmap}.unr ini=${servercfgfullpath}"
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="master" githubbranch="master"
# Server Details # Server Details

4
functions/core_functions.sh

@ -15,10 +15,10 @@ fi
fn_fetch_core_dl(){ fn_fetch_core_dl(){
if [ -z "${githubuser}" ]; then if [ -z "${githubuser}" ]; then
githubuser="dgibbs64" githubuser="GameServerManagers"
fi fi
if [ -z "${githubrepo}" ]; then if [ -z "${githubrepo}" ]; then
githubrepo="linuxgsm" githubrepo="LinuxGSM"
fi fi
if [ -z "${githubbranch}" ]; then if [ -z "${githubbranch}" ]; then
githubbranch="master" githubbranch="master"

33
lgsm/functions/check_deps.sh

@ -73,7 +73,7 @@ fn_found_missing_deps(){
sleep 1 sleep 1
sudo -v > /dev/null 2>&1 sudo -v > /dev/null 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
fn_print_infomation_nl "Automatically installing missing dependencies." fn_print_information_nl "Automatically installing missing dependencies."
fn_script_log_info "Automatically installing missing dependencies." fn_script_log_info "Automatically installing missing dependencies."
echo -en ".\r" echo -en ".\r"
sleep 1 sleep 1
@ -120,7 +120,7 @@ fn_check_loop(){
fn_deps_detector fn_deps_detector
done done
# user to be informaed of any missing dependecies # user to be informed of any missing dependencies
fn_found_missing_deps fn_found_missing_deps
} }
@ -128,7 +128,7 @@ info_distro.sh
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
echo "" echo ""
echo "Checking Dependecies" echo "Checking Dependencies"
echo "=================================" echo "================================="
fi fi
@ -149,8 +149,8 @@ if [ -n "$(command -v dpkg-query)" ]; then
fi fi
fi fi
# All servers except ts3 & mumble require libstdc++6, lib32gcc1 # All servers except ts3,mumble and minecraft servers require libstdc++6 and lib32gcc1
if [ "${gamename}" != "TeamSpeak 3" ]||[ "${gamename}" != "Mumble" ]; then if [ "${gamename}" != "TeamSpeak 3" ]||[ "${gamename}" != "Mumble" ]||[ "${engine}" != "lwjgl2" ]; then
if [ "${arch}" == "x86_64" ]; then if [ "${arch}" == "x86_64" ]; then
array_deps_required+=( lib32gcc1 libstdc++6:i386 ) array_deps_required+=( lib32gcc1 libstdc++6:i386 )
else else
@ -176,10 +176,13 @@ if [ -n "$(command -v dpkg-query)" ]; then
# Brainbread 2 and Don't Starve Together # Brainbread 2 and Don't Starve Together
elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
array_deps_required+=( libcurl4-gnutls-dev:i386 ) array_deps_required+=( libcurl4-gnutls-dev:i386 )
# Project Zomboid # Battlefield: 1942 requies ncurses
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${gamename}" == "Battlefield: 1942" ]; then
array_deps_required+=( libncurses5:i386 )
# Project Zomboid and Minecraft
elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then
array_deps_required+=( default-jdk ) array_deps_required+=( default-jdk )
# Unreal engine # Unreal Engine
elif [ "${executable}" == "./ucc-bin" ]; then elif [ "${executable}" == "./ucc-bin" ]; then
#UT2K4 #UT2K4
if [ -f "${executabledir}/ut2004-bin" ]; then if [ -f "${executabledir}/ut2004-bin" ]; then
@ -188,6 +191,9 @@ if [ -n "$(command -v dpkg-query)" ]; then
else else
array_deps_required+=( libsdl1.2debian bzip2 ) array_deps_required+=( libsdl1.2debian bzip2 )
fi fi
# Unreal Tournament
elif [ "${gamename}" == "Unreal Tournament" ]; then
array_deps_required+=( unzip )
fi fi
fn_deps_email fn_deps_email
fn_check_loop fn_check_loop
@ -212,8 +218,8 @@ elif [ -n "$(command -v yum)" ]; then
fi fi
fi fi
# All servers excelts ts3 & mumble require glibc.i686 libstdc++.i686 # All servers except ts3,mumble and minecraft servers require glibc.i686 and libstdc++.i686
if [ "${executable}" != "./ts3server_startscript.sh" ]||[ "${executable}" != "./murmur.x86" ]; then if [ "${gamename}" != "TeamSpeak 3" ]||[ "${gamename}" != "Mumble" ]||[ "${engine}" != "lwjgl2" ]; then
array_deps_required+=( glibc.i686 libstdc++.i686 ) array_deps_required+=( glibc.i686 libstdc++.i686 )
fi fi
@ -231,8 +237,8 @@ elif [ -n "$(command -v yum)" ]; then
# Brainbread 2 and Don't Starve Together # Brainbread 2 and Don't Starve Together
elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
array_deps_required+=( libcurl.i686 ) array_deps_required+=( libcurl.i686 )
# Project Zomboid # Project Zomboid and Minecraft
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "lwjgl2" ]; then
array_deps_required+=( java-1.8.0-openjdk ) array_deps_required+=( java-1.8.0-openjdk )
# Unreal Engine # Unreal Engine
elif [ "${executable}" == "./ucc-bin" ]; then elif [ "${executable}" == "./ucc-bin" ]; then
@ -243,6 +249,9 @@ elif [ -n "$(command -v yum)" ]; then
else else
array_deps_required+=( SDL.i686 bzip2 ) array_deps_required+=( SDL.i686 bzip2 )
fi fi
# Unreal Tournament
elif [ "${gamename}" == "Unreal Tournament" ]; then
array_deps_required+=( unzip )
fi fi
fn_deps_email fn_deps_email
fn_check_loop fn_check_loop

2
lgsm/functions/check_glibc.sh

@ -35,7 +35,7 @@ elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n
echo -e " * glibc required: ${glibcrequired}" echo -e " * glibc required: ${glibcrequired}"
echo -e " * glibc installed: ${red}${glibcversion}${default}" echo -e " * glibc installed: ${red}${glibcversion}${default}"
echo -en "\n" echo -en "\n"
fn_print_infomation "The game server will probably not work. A distro upgrade is required!" fn_print_information "The game server will probably not work. A distro upgrade is required!"
sleep 5 sleep 5
fi fi
fi fi

4
lgsm/functions/check_ip.sh

@ -8,7 +8,7 @@
local commandname="CHECK" local commandname="CHECK"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
if [ "${gamename}" != "TeamSpeak 3" ]; then if [ "${gamename}" != "TeamSpeak 3" ] && [ "${gamename}" != "Mumble" ]; then
if [ ! -f "/bin/ip" ]; then if [ ! -f "/bin/ip" ]; then
ipcommand="/sbin/ip" ipcommand="/sbin/ip"
else else
@ -24,7 +24,7 @@ if [ "${gamename}" != "TeamSpeak 3" ]; then
fn_print_fail "Check IP: Multiple active network interfaces found." fn_print_fail "Check IP: Multiple active network interfaces found."
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
fn_print_infomation "Specify the IP you want to use within the ${selfname} script.\n" fn_print_information "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 "Set ip=\"0.0.0.0\" to one of the following:\n"
echo -en "${getip}\n" echo -en "${getip}\n"
echo -en "" echo -en ""

49
lgsm/functions/check_permissions.sh

@ -9,19 +9,44 @@ local commandname="CHECK"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
fn_check_ownership(){ fn_check_ownership(){
if [ -f "${rootdir}/${selfname}" ]; then
if [ $(find "${rootdir}/${selfname}" -not -user $(whoami)|wc -l) -ne "0" ]; then
selfownissue=1
fi
fi
if [ -d "${functionsdir}" ]; then
if [ $(find "${functionsdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then
funcownissue=1
fi
fi
if [ -d "${filesdir}" ]; then if [ -d "${filesdir}" ]; then
if [ $(find "${filesdir}" -not -user $(whoami)|wc -l) -ne "0" ]||[ $(find "${rootdir}/${selfname}" -not -user $(whoami)|wc -l) -ne "0" ]; then if [ $(find "${filesdir}" -not -user $(whoami)|wc -l) -ne "0" ]; then
fn_print_fail_nl "Permissions issues found" filesownissue=1
fn_script_log_fatal "Permissions issues found"
fn_print_infomation_nl "The current user ($(whoami)) does not have ownership of the following files:"
fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:"
{
echo -e "User\tGroup\tFile\n"
find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
} | column -s $'\t' -t | tee -a "${scriptlog}"
core_exit.sh
fi fi
fi fi
if [ "${selfownissue}" == "1" ]||[ "${funcownissue}" == "1" ]||[ "${filesownissue}" == "1" ]; then
fn_print_fail_nl "Ownership issues found"
fn_script_log_fatal "Ownership issues found"
fn_print_information_nl "The current user ($(whoami)) does not have ownership of the following files:"
fn_script_log_info "The current user ($(whoami)) does not have ownership of the following files:"
{
echo -e "User\tGroup\tFile\n"
if [ "${selfownissue}" == "1" ]; then
find "${rootdir}/${selfname}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
fi
if [ "${funcownissue}" == "1" ]; then
find "${functionsdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
fi
if [ "${funcownissue}" == "1" ]; then
find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n"
fi
} | column -s $'\t' -t | tee -a "${scriptlog}"
echo ""
fn_print_information_nl "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
fn_script_log "For more information, please see https://github.com/GameServerManagers/LinuxGSM/wiki/FAQ#-fail--starting-game-server-permissions-issues-found"
core_exit.sh
fi
} }
fn_check_permissions(){ fn_check_permissions(){
@ -29,7 +54,7 @@ fn_check_permissions(){
if [ $(find "${functionsdir}" -type f -not -executable|wc -l) -ne "0" ]; then if [ $(find "${functionsdir}" -type f -not -executable|wc -l) -ne "0" ]; then
fn_print_fail_nl "Permissions issues found" fn_print_fail_nl "Permissions issues found"
fn_script_log_fatal "Permissions issues found" fn_script_log_fatal "Permissions issues found"
fn_print_infomation_nl "The following files are not executable:" fn_print_information_nl "The following files are not executable:"
fn_script_log_info "The following files are not executable:" fn_script_log_info "The following files are not executable:"
{ {
echo -e "File\n" echo -e "File\n"
@ -49,7 +74,7 @@ fn_check_permissions(){
if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then if [ "${userrootdirperm}" != "7" ] && [ "${grouprootdirperm}" != "7" ]; then
fn_print_fail_nl "Permissions issues found" fn_print_fail_nl "Permissions issues found"
fn_script_log_fatal "Permissions issues found" fn_script_log_fatal "Permissions issues found"
fn_print_infomation_nl "The following directorys does not have the correct permissions:" fn_print_information_nl "The following directorys does not have the correct permissions:"
fn_script_log_info "The following directorys does not have the correct permissions:" fn_script_log_info "The following directorys does not have the correct permissions:"
ls -l "${rootdir}" ls -l "${rootdir}"
core_exit.sh core_exit.sh

2
lgsm/functions/check_steamcmd.sh

@ -51,7 +51,7 @@ fn_check_steamcmd_sh(){
fn_install_steamcmd fn_install_steamcmd
fi fi
elif [ "${function_selfname}" == "command_install.sh" ]; then elif [ "${function_selfname}" == "command_install.sh" ]; then
fn_print_infomation "SteamCMD is already installed..." fn_print_information "SteamCMD is already installed..."
fn_print_ok_eol_nl fn_print_ok_eol_nl
fi fi
} }

5
lgsm/functions/check_system_requirements.sh

@ -21,6 +21,11 @@ if [ "${gamename}" == "ARMA 3" ]; then
ramrequirementgb="1" ramrequirementgb="1"
fi fi
if [ "${gamename}" == "Minecraft" ]; then
ramrequirementmb="1000"
ramrequirementgb="1"
fi
# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM. # If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
if [ -n "${ramrequirementmb}" ]; then if [ -n "${ramrequirementmb}" ]; then
if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then if [ "${physmemtotalmb}" -lt "${ramrequirementmb}" ]; then

22
lgsm/functions/command_details.sh

@ -3,7 +3,7 @@
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Contributor: UltimateByte # Contributor: UltimateByte
# Website: https://gameservermanagers.com # Website: https://gameservermanagers.com
# Description: Displays server infomation. # Description: Displays server information.
local commandname="DETAILS" local commandname="DETAILS"
local commandaction="Details" local commandaction="Details"
@ -106,7 +106,9 @@ fn_details_gameserver(){
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
{ {
# Server name # Server name
echo -e "${blue}Server name:\t${default}${servername}" if [ -n "${servername}" ]; then
echo -e "${blue}Server name:\t${default}${servername}"
fi
# Server ip # Server ip
echo -e "${blue}Server IP:\t${default}${ip}:${port}" echo -e "${blue}Server IP:\t${default}${ip}:${port}"
@ -287,14 +289,15 @@ fn_details_ports(){
echo -e "Change ports by editing the parameters in:" echo -e "Change ports by editing the parameters in:"
parmslocation="${red}UNKNOWN${default}" parmslocation="${red}UNKNOWN${default}"
local ports_edit_array=( "avalanche" "dontstarve" "projectzomboid" "idtech3" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" ) # engines that require editing in the config file
local ports_edit_array=( "avalanche" "dontstarve" "idtech3" "lwjgl2" "projectzomboid" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "Mumble" "7 Days To Die" )
for port_edit in "${ports_edit_array[@]}" for port_edit in "${ports_edit_array[@]}"
do do
if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
parmslocation="${servercfgfullpath}" parmslocation="${servercfgfullpath}"
fi fi
done done
# engines that require editing in the script file
local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4") local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4")
for port_edit in "${ports_edit_array[@]}" for port_edit in "${ports_edit_array[@]}"
do do
@ -337,6 +340,15 @@ fn_details_dontstarve(){
} | column -s $'\t' -t } | column -s $'\t' -t
} }
fn_details_minecraft(){
echo -e "netstat -atunp | grep java"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
fn_details_projectzomboid(){ fn_details_projectzomboid(){
echo -e "netstat -atunp | grep java" echo -e "netstat -atunp | grep java"
echo -e "" echo -e ""
@ -591,6 +603,8 @@ if [ "${engine}" == "avalanche" ]; then
fn_details_avalanche fn_details_avalanche
elif [ "${engine}" == "dontstarve" ]; then elif [ "${engine}" == "dontstarve" ]; then
fn_details_dontstarve fn_details_dontstarve
elif [ "${engine}" == "lwjgl2" ]; then
fn_details_minecraft
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]; then
fn_details_projectzomboid fn_details_projectzomboid
elif [ "${engine}" == "idtech3" ]; then elif [ "${engine}" == "idtech3" ]; then

4
lgsm/functions/command_fastdl.sh

@ -29,7 +29,7 @@ fn_check_bzip2(){
echo -en "\n" echo -en "\n"
sleep 1 sleep 1
echo "We advise using it" echo "We advise using it"
echo "For more information, see https://github.com/dgibbs64/linuxgsm/wiki/FastDL#bzip2-compression" echo "For more information, see https://github.com/GameServerManagers/LinuxGSM/wiki/FastDL#bzip2-compression"
sleep 2 sleep 2
else else
bzip2installed="1" bzip2installed="1"
@ -310,7 +310,7 @@ fn_fastdl_completed(){
sleep 2 sleep 2
echo -en "\n" echo -en "\n"
echo "" echo ""
fn_print_info "Need more documentation? See https://github.com/dgibbs64/linuxgsm/wiki/FastDL" fn_print_info "Need more documentation? See https://github.com/GameServerManagers/LinuxGSM/wiki/FastDL"
echo -en "\n" echo -en "\n"
if [ "$bzip2installed" == "0" ]; then if [ "$bzip2installed" == "0" ]; then
echo "By the way, you'd better install bzip2 and re-run this command!" echo "By the way, you'd better install bzip2 and re-run this command!"

2
lgsm/functions/command_install.sh

@ -18,7 +18,7 @@ check_deps.sh
if [ "${gamename}" == "Unreal Tournament 2004" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then
install_server_files.sh install_server_files.sh
install_ut2k4_key.sh install_ut2k4_key.sh
elif [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]; then elif [ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Enemy Territory" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Mumble" ]; then
installer=1 installer=1
install_server_files.sh install_server_files.sh
elif [ -n "${appid}" ]; then elif [ -n "${appid}" ]; then

36
lgsm/functions/command_stop.sh

@ -9,7 +9,7 @@ local commandname="STOP"
local commandaction="Stopping" local commandaction="Stopping"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
# Attempts Graceful of source using rcon 'quit' command. # Attempts graceful of source using rcon 'quit' command.
fn_stop_graceful_source(){ fn_stop_graceful_source(){
fn_print_dots "Graceful: rcon quit" fn_print_dots "Graceful: rcon quit"
fn_script_log_info "Graceful: rcon quit" fn_script_log_info "Graceful: rcon quit"
@ -37,7 +37,7 @@ fn_stop_graceful_source(){
fn_stop_tmux fn_stop_tmux
} }
# Attempts Graceful of goldsource using rcon 'quit' command. # Attempts graceful of goldsource using rcon 'quit' command.
# Goldsource 'quit' command restarts rather than shutsdown # Goldsource 'quit' command restarts rather than shutsdown
# this function will only wait 3 seconds then force a tmux shutdown. # this function will only wait 3 seconds then force a tmux shutdown.
# preventing the server from coming back online. # preventing the server from coming back online.
@ -58,7 +58,7 @@ fn_stop_graceful_goldsource(){
fn_stop_tmux fn_stop_tmux
} }
# Attempts Graceful of 7 Days To Die using telnet. # Attempts graceful of 7 Days To Die using telnet.
fn_stop_telnet_sdtd(){ fn_stop_telnet_sdtd(){
sdtd_telnet_shutdown=$( expect -c ' sdtd_telnet_shutdown=$( expect -c '
proc abort {} { proc abort {} {
@ -144,6 +144,34 @@ fn_stop_graceful_sdtd(){
fn_stop_tmux fn_stop_tmux
} }
# Attempts graceful of source using rcon '/stop' command.
fn_stop_graceful_minecraft(){
fn_print_dots "Graceful: console /stop"
fn_script_log_info "Graceful: console /stop"
# sends quit
tmux send -t "${servicename}" /stop ENTER > /dev/null 2>&1
# waits up to 30 seconds giving the server time to shutdown gracefuly
for seconds in {1..30}; do
check_status.sh
if [ "${status}" == "0" ]; then
fn_print_ok "Graceful: console /stop: ${seconds}: "
fn_print_ok_eol_nl
fn_script_log_pass "Graceful: console /stop: OK: ${seconds} seconds"
break
fi
sleep 1
fn_print_dots "Graceful: console /stop: ${seconds}"
done
check_status.sh
if [ "${status}" != "0" ]; then
fn_print_error "Graceful: console /stop: "
fn_print_fail_eol_nl
fn_script_log_error "Graceful: console /stop: FAIL"
fi
sleep 1
fn_stop_tmux
}
fn_stop_graceful_select(){ fn_stop_graceful_select(){
if [ "${gamename}" == "7 Days To Die" ]; then if [ "${gamename}" == "7 Days To Die" ]; then
fn_stop_graceful_sdtd fn_stop_graceful_sdtd
@ -151,6 +179,8 @@ fn_stop_graceful_select(){
fn_stop_graceful_source fn_stop_graceful_source
elif [ "${engine}" == "goldsource" ]; then elif [ "${engine}" == "goldsource" ]; then
fn_stop_graceful_goldsource fn_stop_graceful_goldsource
elif [ "${engine}" == "lwjgl2" ]; then
fn_stop_graceful_minecraft
else else
fn_stop_tmux fn_stop_tmux
fi fi

2
lgsm/functions/command_ts3_server_pass.sh

@ -16,7 +16,7 @@ fn_serveradmin_password_prompt(){
echo "=================================" echo "================================="
echo "" echo ""
echo "Press \"CTRL+b d\" to exit console." echo "Press \"CTRL+b d\" to exit console."
fn_print_infomation_nl "You are about to change the ${gamename} ServerAdmin password." fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password."
fn_print_warning_nl "${gamename} will restart during this process." fn_print_warning_nl "${gamename} will restart during this process."
echo "" echo ""
while true; do while true; do

2
lgsm/functions/command_update.sh

@ -15,6 +15,8 @@ check.sh
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${gamename}" == "TeamSpeak 3" ]; then
update_ts3.sh update_ts3.sh
elif [ "${engine}" == "lwjgl2" ]; then
update_minecraft.sh
elif [ "${gamename}" == "Mumble" ]; then elif [ "${gamename}" == "Mumble" ]; then
update_mumble.sh update_mumble.sh
else else

6
lgsm/functions/core_dl.sh

@ -44,7 +44,7 @@ fn_dl_md5(){
fi fi
} }
# Extracts bzip2 or gzip files # Extracts bzip2 or gzip or zip files
# Extracts can be defined in code like so: # Extracts can be defined in code like so:
# fn_dl_extract "${filedir}" "${filename}" "${extractdir}" # fn_dl_extract "${filedir}" "${filename}" "${extractdir}"
# fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" # fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles"
@ -61,6 +61,8 @@ fn_dl_extract(){
tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}") tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}")
elif [ "${mime}" == "application/x-bzip2" ]; then elif [ "${mime}" == "application/x-bzip2" ]; then
tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}") tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}")
elif [ "${mime}" == "application/zip" ]; then
tarcmd=$(unzip -d "${extractdir}" "${filedir}/${filename}")
fi fi
local exitcode=$? local exitcode=$?
if [ ${exitcode} -ne 0 ]; then if [ ${exitcode} -ne 0 ]; then
@ -115,7 +117,7 @@ fn_fetch_file(){
# trap to remove part downloaded files # trap to remove part downloaded files
trap fn_fetch_trap INT trap fn_fetch_trap INT
# if larger file shows progress bar # if larger file shows progress bar
if [ ${filename##*.} == "bz2" ]; then if [ ${filename##*.} == "bz2" ]||[ ${filename##*.} == "jar" ]; then
echo -ne "downloading ${filename}..." echo -ne "downloading ${filename}..."
sleep 1 sleep 1
curlcmd=$(${curlcmd} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") curlcmd=$(${curlcmd} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}")

14
lgsm/functions/core_functions.sh

@ -322,6 +322,10 @@ functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
fix_ut.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
# Info # Info
@ -396,6 +400,11 @@ functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
update_minecraft.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
update_mumble.sh(){ update_mumble.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
@ -451,6 +460,11 @@ functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function
} }
install_minecraft_eula.sh(){
functionfile="${FUNCNAME}"
fn_fetch_function
}
install_retry.sh(){ install_retry.sh(){
functionfile="${FUNCNAME}" functionfile="${FUNCNAME}"
fn_fetch_function fn_fetch_function

92
lgsm/functions/core_getopt.sh

@ -41,7 +41,7 @@ case "${getopt}" in
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -65,7 +65,7 @@ case "${getopt}" in
echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD." echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
@ -103,7 +103,7 @@ case "${getopt}" in
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -125,7 +125,7 @@ case "${getopt}" in
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}change-password\t${default}pw |Changes TS3 serveradmin password." echo -e "${blue}change-password\t${default}pw |Changes TS3 serveradmin password."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}install\t${default}i |Install the server." echo -e "${blue}install\t${default}i |Install the server."
@ -134,6 +134,68 @@ case "${getopt}" in
esac esac
} }
fn_getopt_minecraft(){
case "${getopt}" in
st|start)
command_start.sh;;
sp|stop)
command_stop.sh;;
r|restart)
command_restart.sh;;
u|update)
command_update.sh;;
uf|update-functions)
command_update_functions.sh;;
m|monitor)
command_monitor.sh;;
ta|test-alert)
command_test_alert.sh;;
dt|details)
command_details.sh;;
b|backup)
command_backup.sh;;
c|console)
command_console.sh;;
d|debug)
command_debug.sh;;
dev|dev-debug)
command_dev_debug.sh;;
i|install)
command_install.sh;;
ai|auto-install)
fn_autoinstall;;
dd|deps-detect)
command_dev_detect_deps.sh;;
dg|detect-glibc)
command_dev_detect_glibc.sh;;
*)
if [ -n "${getopt}" ]; then
echo -e "${red}Unknown command${default}: $0 ${getopt}"
exitcode=2
fi
echo "Usage: $0 [option]"
echo "${gamename} - Linux Game Server Manager - Version ${version}"
echo "https://gameservermanagers.com/${selfname}"
echo -e ""
echo -e "${lightyellow}Commands${default}"
{
echo -e "${blue}start\t${default}st |Start the server."
echo -e "${blue}stop\t${default}sp |Stop the server."
echo -e "${blue}restart\t${default}r |Restart the server."
echo -e "${blue}update\t${default}u |Checks and applies updates from mojang.com."
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
echo -e "${blue}install\t${default}i |Install the server."
echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
} | column -s $'\t' -t
esac
}
fn_getopt_mumble(){ fn_getopt_mumble(){
case "${getopt}" in case "${getopt}" in
st|start) st|start)
@ -158,7 +220,7 @@ case "${getopt}" in
command_dev_debug.sh;; command_dev_debug.sh;;
i|install) i|install)
command_install.sh;; command_install.sh;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -180,7 +242,7 @@ case "${getopt}" in
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}install\t${default}i |Install the server." echo -e "${blue}install\t${default}i |Install the server."
} | column -s $'\t' -t } | column -s $'\t' -t
@ -222,7 +284,7 @@ case "${getopt}" in
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -248,7 +310,7 @@ case "${getopt}" in
echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD." echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
@ -289,7 +351,7 @@ case "${getopt}" in
fn_autoinstall;; fn_autoinstall;;
mc|map-compressor) mc|map-compressor)
compress_ut99_maps.sh;; compress_ut99_maps.sh;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -310,7 +372,7 @@ case "${getopt}" in
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
@ -357,7 +419,7 @@ case "${getopt}" in
command_install.sh;; command_install.sh;;
ai|auto-install) ai|auto-install)
fn_autoinstall;; fn_autoinstall;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -383,7 +445,7 @@ case "${getopt}" in
echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD." echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
@ -427,7 +489,7 @@ case "${getopt}" in
install_ut2k4_key.sh;; install_ut2k4_key.sh;;
mc|map-compressor) mc|map-compressor)
compress_unreal2_maps.sh;; compress_unreal2_maps.sh;;
dd|depsdetect) dd|deps-detect)
command_dev_detect_deps.sh;; command_dev_detect_deps.sh;;
dg|detect-glibc) dg|detect-glibc)
command_dev_detect_glibc.sh;; command_dev_detect_glibc.sh;;
@ -448,7 +510,7 @@ case "${getopt}" in
echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
echo -e "${blue}monitor\t${default}m |Checks that the server is running." echo -e "${blue}monitor\t${default}m |Checks that the server is running."
echo -e "${blue}test-alert\t${default}ta |Sends test alert." echo -e "${blue}test-alert\t${default}ta |Sends test alert."
echo -e "${blue}details\t${default}dt |Displays useful infomation about the server." echo -e "${blue}details\t${default}dt |Displays useful information about the server."
echo -e "${blue}backup\t${default}b |Create archive of the server." echo -e "${blue}backup\t${default}b |Create archive of the server."
echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
@ -462,6 +524,8 @@ case "${getopt}" in
if [ "${gamename}" == "Mumble" ]; then if [ "${gamename}" == "Mumble" ]; then
fn_getopt_mumble fn_getopt_mumble
elif [ "${engine}" == "lwjgl2" ]; then
fn_getopt_minecraft
elif [ "${gamename}" == "TeamSpeak 3" ]; then elif [ "${gamename}" == "TeamSpeak 3" ]; then
fn_getopt_teamspeak3 fn_getopt_teamspeak3
elif [ "${gamename}" == "Garry's Mod" ]; then elif [ "${gamename}" == "Garry's Mod" ]; then

10
lgsm/functions/core_messages.sh

@ -249,13 +249,13 @@ fn_print_warning_nl(){
echo -e "${yellow}Warning!${default} $@" echo -e "${yellow}Warning!${default} $@"
} }
# Infomation! # Information!
fn_print_infomation(){ fn_print_information(){
echo -en "${cyan}Infomation!${default} $@" echo -en "${cyan}Information!${default} $@"
} }
fn_print_infomation_nl(){ fn_print_information_nl(){
echo -e "${cyan}Infomation!${default} $@" echo -e "${cyan}Information!${default} $@"
} }
# On-Screen End of Line # On-Screen End of Line

6
lgsm/functions/fix.sh

@ -72,5 +72,11 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
echo "=================================" echo "================================="
sleep 1 sleep 1
fix_ut99.sh fix_ut99.sh
elif [ "${gamename}" == "Unreal Tournament" ]; then
echo ""
echo "Applying ${gamename} Server Fixes"
echo "================================="
sleep 1
fix_ut.sh
fi fi
fi fi

14
lgsm/functions/fix_ut.sh

@ -0,0 +1,14 @@
#!/bin/bash
# LGSM fix_ut.sh function
# Author: Alexander Hurd
# Website: https://gameservermanagers.com
# Description: Resolves various issues with Unreal Tournament.
local commandname="FIX"
local commandaction="Fix"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
#Set Binary Executable
echo "chmod +x ${executabledir}/${executable}"
chmod +x "${executabledir}/${executable}"
sleep 1

53
lgsm/functions/info_config.sh

@ -10,7 +10,7 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
## Examples of filtering to get info from config files ## Examples of filtering to get info from config files
# sed 's/foo//g' - remove foo # sed 's/foo//g' - remove foo
# tr -cd '[:digit:]' leave only digits # tr -cd '[:digit:]' leave only digits
# tr -d '=\"; ' remove selected charectors =\"; # tr -d '=\"; ' remove selected characters =\";
# grep -v "foo" filter out lines that contain foo # grep -v "foo" filter out lines that contain foo
unavailable="${red}UNAVAILABLE${default}" unavailable="${red}UNAVAILABLE${default}"
@ -68,6 +68,37 @@ fn_info_config_dontstarve(){
fi fi
} }
fn_info_config_minecraft(){
if [ ! -f "${servercfgfullpath}" ]; then
rconpassword="${unavailable}"
rconport="${zero}"
slots="${zero}"
port="${zero}"
gamemode="${zero}"
gameworld="${unavailable}"
else
# check if the ip exists in the config file. Failing this will fall back to the default.
ipconfigcheck=$(grep "server-ip=" "${servercfgfullpath}" | sed 's/server-ip=//g')
if [ -n "${ipconfigcheck}" ]; then
ip="${ipconfigcheck}"
fi
rconpassword=$(grep "rcon.password=" "${servercfgfullpath}" | sed 's/rcon.password=//g' | tr -d '=\"; ')
rconport=$(grep "rcon.port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
slots=$(grep "max-players=" "${servercfgfullpath}" | tr -cd '[:digit:]')
port=$(grep "server-port=" "${servercfgfullpath}" | tr -cd '[:digit:]')
gamemode=$(grep "gamemode=" "${servercfgfullpath}" | tr -cd '[:digit:]')
gameworld=$(grep "level-name=" "${servercfgfullpath}" | sed 's/level-name=//g' | tr -d '=\"; ')
# Not Set
rconpassword=${rconpassword:-"NOT SET"}
rconport=${rconport:-"NOT SET"}
slots=${slots:-"NOT SET"}
port=${port:-"NOT SET"}
gamemode=${gamemode:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
fi
}
fn_info_config_projectzomboid(){ fn_info_config_projectzomboid(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}" servername="${unavailable}"
@ -77,9 +108,9 @@ fn_info_config_projectzomboid(){
port="${zero}" port="${zero}"
gameworld="${unavailable}" gameworld="${unavailable}"
else else
servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '\') servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=\";\n')
serverpassword=$(grep "^Password=$" "${servercfgfullpath}" | sed 's/Password=//g' | tr -d '\') serverpassword=$(grep "^Password=$" "${servercfgfullpath}" | sed 's/Password=//g' | tr -d '=\"; ')
rconpassword=$(grep "RCONPassword=" "${servercfgfullpath}" | sed 's/RCONPassword=//g' | tr -d '\') rconpassword=$(grep "RCONPassword=" "${servercfgfullpath}" | sed 's/RCONPassword=//g' | tr -d '=\"; ')
slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
gameworld=$(grep "Map=" "${servercfgfullpath}" | sed 's/Map=//g' | tr -d '\n') gameworld=$(grep "Map=" "${servercfgfullpath}" | sed 's/Map=//g' | tr -d '\n')
@ -374,18 +405,22 @@ fn_info_config_sdtd(){
gameworld=${gameworld:-"NOT SET"} gameworld=${gameworld:-"NOT SET"}
fi fi
} }
## Just Cause 2
# Just Cause 2
if [ "${engine}" == "avalanche" ]; then if [ "${engine}" == "avalanche" ]; then
fn_info_config_avalanche fn_info_config_avalanche
## Dont Starve Together # Dont Starve Together
elif [ "${engine}" == "dontstarve" ]; then elif [ "${engine}" == "dontstarve" ]; then
fn_info_config_dontstarve fn_info_config_dontstarve
## Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then
fn_info_config_projectzomboid
# Quake Love # Quake Love
elif [ "${engine}" == "idtech3" ]; then elif [ "${engine}" == "idtech3" ]; then
fn_info_config_idtech3 fn_info_config_idtech3
# Minecraft
elif [ "${engine}" == "lwjgl2" ]; then
fn_info_config_minecraft
# Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then
fn_info_config_projectzomboid
# ARMA 3 # ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${engine}" == "realvirtuality" ]; then
fn_info_config_realvirtuality fn_info_config_realvirtuality

8
lgsm/functions/info_distro.sh

@ -7,7 +7,7 @@
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
### Distro infomation ### Distro information
## Distro ## Distro
# Returns architecture, kernel and distro/os. # Returns architecture, kernel and distro/os.
@ -53,12 +53,12 @@ hours=$(( uptime/60/60%24 ))
days=$(( uptime/60/60/24 )) days=$(( uptime/60/60/24 ))
### Performance infomation ### Performance information
## Average server load ## Average server load
load=$(uptime|awk -F 'load average: ' '{ print $2 }') load=$(uptime|awk -F 'load average: ' '{ print $2 }')
## Memory Infomation ## Memory information
# Available RAM and swap. # Available RAM and swap.
# Older versions of free do not support -h option. # Older versions of free do not support -h option.
@ -77,7 +77,7 @@ swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}')
swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}') swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}')
swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}') swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}')
### Disk Infomation ### Disk information
## Available disk space on the partition. ## Available disk space on the partition.
filesystem=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $1}') filesystem=$(df -hP "${rootdir}" | grep -v "Filesystem" | awk '{print $1}')

18
lgsm/functions/info_glibc.sh

@ -29,18 +29,27 @@ elif [ "${gamename}" == "Garry's Mod" ]; then
elif [ "${gamename}" == "Insurgency" ]; then elif [ "${gamename}" == "Insurgency" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="yes" glibcfix="yes"
elif [ "${gamename}" == "Mumble" ]; then
glibcrequired="NOT REQUIRED"
glibcfix="no"
elif [ "${gamename}" == "No More Room in Hell" ]; then elif [ "${gamename}" == "No More Room in Hell" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="yes" glibcfix="yes"
elif [ "${gamename}" == "Quake Live" ]; then elif [ "${gamename}" == "Quake Live" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="no" glibcfix="no"
elif [ "${gamename}" == "TeamSpeak 3" ]; then
glibcrequired="NOT REQUIRED"
glibcfix="no"
elif [ "${engine}" == "avalanche" ]; then elif [ "${engine}" == "avalanche" ]; then
glibcrequired="2.13" glibcrequired="2.13"
glibcfix="yes" glibcfix="yes"
elif [ "${engine}" == "dontstarve" ]; then elif [ "${engine}" == "dontstarve" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "lwjgl2" ]; then
glibcrequired="NOT REQUIRED"
glibcfix="no"
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="no" glibcfix="no"
@ -68,6 +77,9 @@ elif [ "${engine}" == "unreal" ]; then
elif [ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal2" ]; then
glibcrequired="2.4" glibcrequired="2.4"
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "unreal3" ]; then
glibcrequired="2.3.2"
glibcfix="no"
elif [ "${engine}" == "unreal4" ]; then elif [ "${engine}" == "unreal4" ]; then
glibcrequired="2.14" glibcrequired="2.14"
glibcfix="no" glibcfix="no"
@ -80,6 +92,12 @@ elif [ "${gamename}" == "TeamSpeak 3" ]; then
elif [ "${gamename}" == "Mumble" ]; then elif [ "${gamename}" == "Mumble" ]; then
glibcrequired="NOT REQUIRED" glibcrequired="NOT REQUIRED"
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "idtech3" ]; then
glibcrequired="2.0"
glibcfix="no"
elif [ "${engine}" == "refractor" ]; then
glibcrequired="2.0"
glibcfix="no"
else else
glibcrequired="UNKNOWN" glibcrequired="UNKNOWN"
glibcfix="no" glibcfix="no"

74
lgsm/functions/install_config.sh

@ -36,7 +36,7 @@ fn_userinputconfig(){
fn_script_log_info "changing rconpassword." fn_script_log_info "changing rconpassword."
sed -i "s/\"<rconpassword>\"/\"${rconpass}\"/g" "${servercfgfullpath}" sed -i "s/\"<rconpassword>\"/\"${rconpass}\"/g" "${servercfgfullpath}"
sleep 1 sleep 1
} }
fn_arma3config(){ fn_arma3config(){
fn_defaultconfig fn_defaultconfig
@ -165,6 +165,57 @@ fn_unreal2config(){
echo "" echo ""
} }
fn_ut3config(){
echo ""
echo "Configuring ${gamename} Server"
echo "================================="
sleep 1
echo "setting ServerName to 'LinuxGSM UT3 Server'."
fn_script_log_info "setting ServerName to 'LinuxGSM UT3 Server'."
sleep 1
sed -i 's/ServerName=/ServerName=LinuxGSM UT3 Server/g' "${servercfgdir}/DefaultGame.ini"
echo "setting WebAdmin password to admin."
fn_script_log_info "setting WebAdmin password to admin."
echo '[Engine.AccessControl]' >> "${servercfgdir}/DefaultGame.ini"
echo 'AdminPassword=admin' >> "${servercfgdir}/DefaultGame.ini"
sleep 1
echo "enabling WebAdmin."
fn_script_log_info "enabling WebAdmin."
sed -i 's/bEnabled=false/bEnabled=True/g' "${servercfgdir}/DefaultWeb.ini"
if [ "${gamename}" == "Unreal Tournament 3" ]; then
sleep 1
echo "setting WebAdmin port to 8081."
fn_script_log_info "setting WebAdmin port to 8081."
sed -i 's/ListenPort=80/ListenPort=8081/g' "${servercfgdir}/DefaultWeb.ini"
fi
sleep 1
echo ""
}
fn_unrealtournament(){
# allow user to input server name and password
if [ -z "${autoinstall}" ]; then
echo ""
echo "Configuring ${gamename} Server"
echo "================================="
sleep 1
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
else
servername="${servicename}"
rconpass="rconpassword"
fi
echo "changing hostname."
fn_script_log_info "changing hostname."
sed -i "s/\"<hostname>\"/\"${servername}\"/g" "${servercfgdir}/Game.ini"
sleep 1
echo "changing rconpassword."
fn_script_log_info "changing rconpassword."
sed -i "s/\"<rconpassword>\"/\"${rconpass}\"/g" "${servercfgdir}/Engine.ini"
sleep 1
}
echo "" echo ""
if [ "${gamename}" != "Hurtworld" ]; then if [ "${gamename}" != "Hurtworld" ]; then
echo "Creating Configs" echo "Creating Configs"
@ -257,6 +308,13 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Empires Mod" ]; then elif [ "${gamename}" == "Empires Mod" ]; then
fn_defaultconfig fn_defaultconfig
elif [ "${gamename}" == "Enemy Territory" ]; then
echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/EnemyTerritory/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1
fn_defaultconfig
fn_userinputconfig
echo ""
elif [ "${gamename}" == "Fistful of Frags" ]; then elif [ "${gamename}" == "Fistful of Frags" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
@ -301,6 +359,11 @@ elif [ "${gamename}" == "Left 4 Dead 2" ]; then
wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Minecraft" ]; then
echo -e "downloading lgsm-default.ini...\c"
wget -N /dev/null ${githuburl}/Minecraft/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1
fn_defaultconfig
elif [ "${gamename}" == "No More Room in Hell" ]; then elif [ "${gamename}" == "No More Room in Hell" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
@ -382,6 +445,15 @@ elif [ "${gamename}" == "Terraria" ]; then
wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N /dev/null ${githuburl}/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_defaultconfig fn_defaultconfig
elif [ "${gamename}" == "Unreal Tournament" ]; then
echo -e "downloading Engine.ini...\c"
wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Engine.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
echo -e "downloading Game.ini...\c"
wget -N /dev/null ${githuburl}/UnrealTournament/cfg/Game.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1
fn_unrealtournament
elif [ "${gamename}" == "Unreal Tournament 3" ]; then
fn_ut3config
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
fn_unreal2config fn_unreal2config
elif [ "${gamename}" == "Unreal Tournament 99" ]; then elif [ "${gamename}" == "Unreal Tournament 99" ]; then

2
lgsm/functions/install_gslt.sh

@ -12,7 +12,7 @@ echo ""
echo "Game Server Login Token" echo "Game Server Login Token"
echo "=================================" echo "================================="
sleep 1 sleep 1
if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then if [ "${gamename}" == "Counter Strike: Global Offensive" ]||[ "${gamename}" == "Counter Strike: Source" ]; then
echo "GSLT is required to run a public ${gamename} server" echo "GSLT is required to run a public ${gamename} server"
fn_script_log_info "GSLT is required to run a public ${gamename} server" fn_script_log_info "GSLT is required to run a public ${gamename} server"
else else

33
lgsm/functions/install_minecraft_eula.sh

@ -0,0 +1,33 @@
#!/bin/bash
# LGSM install_minecraft_eula.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Description: Gets user to accept the EULA.
echo ""
echo "Accept ${gamename} EULA"
echo "================================="
sleep 1
echo "You are required to accept the EULA:"
echo "https://account.mojang.com/documents/minecraft_eula"
echo "eula=false" > "${filesdir}/eula.txt"
if [ -z "${autoinstall}" ]; then
echo "By continuing you are indicating your agreement to the EULA."
echo ""
while true; do
read -e -i "y" -p "Continue [Y/n]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) core_exit.sh;;
* ) echo "Please answer yes or no.";;
esac
done
else
echo "By using auto-install you are indicating your agreement to the EULA."
echo ""
sleep 5
fi
sed -i "s/eula=false/eula=true/g" "${filesdir}/eula.txt"

13
lgsm/functions/install_server_files.sh

@ -13,6 +13,14 @@ fn_install_server_files(){
fileurl="https://gameservermanagers.com/files/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" fileurl="https://gameservermanagers.com/files/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
fileurl="https://gameservermanagers.com/files/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut2004-server-3339-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54" fileurl="https://gameservermanagers.com/files/UnrealTournament2004/ut2004-server-3339-ultimate-linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="ut2004-server-3339-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="67c5e2cd9c2a4b04f163962ee41eff54"
elif [ "${gamename}" == "Unreal Tournament 3" ]; then
fileurl="https://s3.amazonaws.com/linuxgsm/UT3-linux-server-2.1.tar.gz"; filedir="${lgsmdir}/tmp"; filename="UT3-linux-server-2.1.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c22fcef9e2e03ed154df97569af540c"
elif [ "${gamename}" == "Battlefield: 1942" ]; then
fileurl="https://s3.amazonaws.com/linuxgsm/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; filedir="${lgsmdir}/tmp"; filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="7e9d2538a62b228f2de7176b44659aa9"
elif [ "${gamename}" == "Enemy Territory" ]; then
fileurl="https://s3.amazonaws.com/linuxgsm/enemy-territory.260b.tar.gz"; filedir="${lgsmdir}/tmp"; filename="enemy-territory.260b.tar.gz"; executecmd="noexecute" run="norun"; force="noforce"; md5="ded32053e470fe15d9403ec4a0ab7e89"
elif [ "${gamename}" == "Unreal Tournament" ]; then
fileurl="https://s3.amazonaws.com/unrealtournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${lgsmdir}/tmp"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6"
elif [ "${gamename}" == "GoldenEye: Source" ]; then elif [ "${gamename}" == "GoldenEye: Source" ]; then
fileurl="https://gameservermanagers.com/files/GoldenEyeSource/goldenEye_source_v4.2.4_server_2015_map_pack.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="goldenEye_source_v4.2.4_server_2015_map_pack.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="3148ac38acc3642b0d6d64f51f27de15" fileurl="https://gameservermanagers.com/files/GoldenEyeSource/goldenEye_source_v4.2.4_server_2015_map_pack.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="goldenEye_source_v4.2.4_server_2015_map_pack.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="3148ac38acc3642b0d6d64f51f27de15"
fi fi
@ -78,7 +86,7 @@ fn_install_server_files_steamcmd(){
# Goldsource servers commonly fail to download all the server files required. # Goldsource servers commonly fail to download all the server files required.
# Validating a few of times may reduce the chance of this issue. # Validating a few of times may reduce the chance of this issue.
if [ "${engine}" == "goldsource" ]; then if [ "${engine}" == "goldsource" ]; then
fn_print_infomation_nl "Goldsource servers commonly fail to download all the server files required. Validating a few of times may reduce the chance of this issue." fn_print_information_nl "Goldsource servers commonly fail to download all the server files required. Validating a few of times may reduce the chance of this issue."
counter="0" counter="0"
while [ "${counter}" -le "4" ]; do while [ "${counter}" -le "4" ]; do
counter=$((counter+1)) counter=$((counter+1))
@ -95,6 +103,9 @@ sleep 1
if [ "${gamename}" == "TeamSpeak 3" ]; then if [ "${gamename}" == "TeamSpeak 3" ]; then
update_ts3.sh update_ts3.sh
elif [ "${gamename}" == "Minecraft" ]; then
update_minecraft.sh
install_minecraft_eula.sh
elif [ "${gamename}" == "Mumble" ]; then elif [ "${gamename}" == "Mumble" ]; then
update_mumble.sh update_mumble.sh
elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then

157
lgsm/functions/update_minecraft.sh

@ -0,0 +1,157 @@
#!/bin/bash
# LGSM update_minecraft.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Description: Handles updating of Minecraft servers.
local commandname="UPDATE"
local commandaction="Update"
local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
fn_update_dl(){
fn_fetch_file "https://s3.amazonaws.com/Minecraft.Download/versions/${availablebuild}/minecraft_server.${availablebuild}.jar" "${lgsmdir}/tmp" "minecraft_server.${availablebuild}.jar"
echo -e "copying to ${filesdir}...\c"
fn_script_log "Copying to ${filesdir}"
cp "${lgsmdir}/tmp/minecraft_server.${availablebuild}.jar" "${filesdir}/minecraft_server.jar"
local exitcode=$?
if [ ${exitcode} -eq 0 ]; then
fn_print_ok_eol_nl
else
fn_print_fail_eol_nl
fi
}
fn_update_currentbuild(){
# Gets current build info
# Checks if current build info is available. If it fails, then a server restart will be forced to generate logs.
if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then
fn_print_error "Checking for update: mojang.com"
sleep 1
fn_print_error_nl "Checking for update: mojang.com: No logs with server version found"
fn_script_log_error "Checking for update: mojang.com: No logs with server version found"
sleep 1
fn_print_info_nl "Checking for update: mojang.com: Forcing server restart"
fn_script_log_info "Checking for update: mojang.com: Forcing server restart"
sleep 1
exitbypass=1
command_stop.sh
exitbypass=1
command_start.sh
sleep 1
# Check again and exit on failure.
if [ ! -f "${consolelogdir}/${servicename}-console.log" ]; then
fn_print_fail_nl "Checking for update: mojang.com: Still No logs with server version found"
fn_script_log_fatal "Checking for update: mojang.com: Still No logs with server version found"
core_exit.sh
fi
fi
# Get current build from logs
currentbuild=$(cat "${filesdir}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
if [ -z "${currentbuild}" ]; then
fn_print_error_nl "Checking for update: mojang.com: Current build version not found"
fn_script_log_error "Checking for update: mojang.com: Current build version not found"
sleep 1
fn_print_info_nl "Checking for update: mojang.com: Forcing server restart"
fn_script_log_info "Checking for update: mojang.com: Forcing server restart"
exitbypass=1
command_stop.sh
exitbypass=1
command_start.sh
currentbuild=$(cat "${filesdir}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
if [ -z "${currentbuild}" ]; then
fn_print_fail_nl "Checking for update: mojang.com: Current build version still not found"
fn_script_log_fatal "Checking for update: mojang.com: Current build version still not found"
core_exit.sh
fi
fi
}
fn_update_availablebuild(){
# Gets latest build info.
availablebuild=$(curl -s "https://launchermeta.mojang.com/mc/game/version_manifest.json" | sed -e 's/^.*"release":"\([^"]*\)".*$/\1/')
sleep 1
# Checks if availablebuild variable has been set
if [ -z "${availablebuild}" ]; then
fn_print_fail "Checking for update: mojang.com"
sleep 1
fn_print_fail "Checking for update: mojang.com: Not returning version info"
fn_script_log_fatal "Failure! Checking for update: mojang.com: Not returning version info"
core_exit.sh
else
fn_print_ok_nl "Checking for update: mojang.com"
fn_script_log_pass "Checking for update: mojang.com"
sleep 1
fi
}
fn_update_compare(){
# Removes dots so if can compare version numbers
currentbuilddigit=$(echo "${currentbuild}"|tr -cd '[:digit:]')
availablebuilddigit=$(echo "${availablebuild}"|tr -cd '[:digit:]')
if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then
echo -e "\n"
echo -e "Update available:"
sleep 1
echo -e " Current build: ${red}${currentbuild}${default}"
echo -e " Available build: ${green}${availablebuild}${default}"
echo -e ""
sleep 1
echo ""
echo -en "Applying update.\r"
sleep 1
echo -en "Applying update..\r"
sleep 1
echo -en "Applying update...\r"
sleep 1
echo -en "\n"
fn_script_log "Update available"
fn_script_log "Current build: ${currentbuild}"
fn_script_log "Available build: ${availablebuild}"
fn_script_log "${currentbuild} > ${availablebuild}"
unset updateonstart
check_status.sh
if [ "${status}" == "0" ]; then
fn_update_dl
exitbypass=1
command_start.sh
exitbypass=1
command_stop.sh
else
exitbypass=1
command_stop.sh
fn_update_dl
exitbypass=1
command_start.sh
fi
alert="update"
alert.sh
else
echo -e "\n"
echo -e "No update available:"
echo -e " Current version: ${green}${currentbuild}${default}"
echo -e " Available version: ${green}${availablebuild}${default}"
echo -e ""
fn_print_ok_nl "No update available"
fn_script_log_info "Current build: ${currentbuild}"
fn_script_log_info "Available build: ${availablebuild}"
fi
}
if [ "${installer}" == "1" ]; then
fn_update_availablebuild
fn_update_dl
else
# Checks for server update from mojang.com
fn_print_dots "Checking for update: mojang.com"
fn_script_log_info "Checking for update: mojang.com"
sleep 1
fn_update_currentbuild
fn_update_availablebuild
fn_update_compare
fi

2
lgsm/functions/update_mumble.sh

@ -87,7 +87,7 @@ fn_update_mumble_availablebuild(){
fn_script_log_fatal "Failure! Checking for update: GitHub: Not returning version info" fn_script_log_fatal "Failure! Checking for update: GitHub: Not returning version info"
core_exit.sh core_exit.sh
else else
fn_print_ok_nl "Checking for update: GitHub" fn_print_ok "Checking for update: GitHub"
fn_script_log_pass "Checking for update: GitHub" fn_script_log_pass "Checking for update: GitHub"
sleep 1 sleep 1
fi fi

2
lgsm/functions/update_ts3.sh

@ -119,7 +119,7 @@ fn_update_ts3_availablebuild(){
fn_script_log_fatal "Failure! Checking for update: teamspeak.com: Not returning version info" fn_script_log_fatal "Failure! Checking for update: teamspeak.com: Not returning version info"
core_exit.sh core_exit.sh
else else
fn_print_ok_nl "Checking for update: teamspeak.com" fn_print_ok "Checking for update: teamspeak.com"
fn_script_log_pass "Checking for update: teamspeak.com" fn_script_log_pass "Checking for update: teamspeak.com"
sleep 1 sleep 1
fi fi

4
tests/tests_jc2server.sh

@ -41,8 +41,8 @@ parms=""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="$TRAVIS_BRANCH" githubbranch="$TRAVIS_BRANCH"
# Steam # Steam

4
tests/tests_ts3server.sh

@ -37,8 +37,8 @@ parms=""
# Github Branch Select # Github Branch Select
# Allows for the use of different function files # Allows for the use of different function files
# from a different repo and/or branch. # from a different repo and/or branch.
githubuser="dgibbs64" githubuser="GameServerManagers"
githubrepo="linuxgsm" githubrepo="LinuxGSM"
githubbranch="$TRAVIS_BRANCH" githubbranch="$TRAVIS_BRANCH"
# Server Details # Server Details

Loading…
Cancel
Save