Browse Source

Merge branch 'master' into config-select

pull/372/head
Ilija Matoski 10 years ago
parent
commit
b6cf07bee1
  1. 2
      7DaysToDie/sdtdserver
  2. 20
      Arma3/arma3server
  3. 77
      Arma3/cfg/lgsm-default.network.cfg
  4. 0
      Arma3/cfg/lgsm-default.server.cfg
  5. 2
      BladeSymphony/bsserver
  6. 2
      CounterStrike/csserver
  7. 2
      CounterStrikeConditionZero/csczserver
  8. 2
      CounterStrikeGlobalOffensive/csgoserver
  9. 2
      CounterStrikeSource/cssserver
  10. 2
      DayOfDefeat/dodserver
  11. 2
      DayOfDefeatSource/dodsserver
  12. 0
      DeathmatchClassic/cfg/lgsm-default.cfg
  13. 97
      DeathmatchClassic/dmcserver
  14. 15
      DoubleActionBoogaloo/cfg/lgsm-default.cfg
  15. 98
      DoubleActionBoogaloo/dabserver
  16. BIN
      DoubleActionBoogaloo/dependencies/libm.so.6
  17. 2
      FistfulOfFrags/fofserver
  18. 6
      GarrysMod/cfg/lgsm-default.cfg
  19. 7
      GarrysMod/gmodserver
  20. 2
      HalfLife2Deathmatch/hl2dmserver
  21. 35
      HalfLifeDeathmatch/cfg/lgsm-default.cfg
  22. 14
      HalfLifeDeathmatch/hldmserver
  23. 2
      Insurgency/insserver
  24. 2
      JustCause2/jc2server
  25. 2
      KillingFloor/kfserver
  26. 2
      Left4Dead/l4dserver
  27. 2
      Left4Dead2/l4d2server
  28. 2
      NaturalSelection2/ns2server
  29. 171
      NoMoreRoomInHell/cfg/lgsm-default.cfg
  30. 2
      NoMoreRoomInHell/nmrihserver
  31. 35
      OpposingForce/cfg/lgsm-default.cfg
  32. 97
      OpposingForce/opforserver
  33. 64
      README.md
  34. 2
      RedOrchestra/roserver
  35. 35
      Ricochet/cfg/lgsm-default.cfg
  36. 97
      Ricochet/ricochetserver
  37. 4
      SeriousSam3BFE/ss3sserver
  38. 2
      StarBound/sbserver
  39. 2
      TeamFortress2/tf2server
  40. 2
      TeamFortressClassic/tfcserver
  41. 2
      TeamSpeak3/ts3server
  42. 6
      UnrealTournament2004/ut2k4server
  43. 6
      UnrealTournament99/ut99server
  44. 5
      functions/fn_check_tmux
  45. 4
      functions/fn_getopt
  46. 4
      functions/fn_install
  47. 61
      functions/fn_install_config
  48. 28
      functions/fn_install_glibcfix
  49. 5
      functions/fn_install_ut99fix
  50. 4
      functions/fn_monitor
  51. 17
      functions/fn_monitor_query
  52. 291
      functions/fn_update_check
  53. 63
      functions/fn_update_dl

2
7DaysToDie/sdtdserver

@ -74,7 +74,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

20
Arma3/arma3server

@ -4,7 +4,7 @@
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Contributor: Scarsz # Contributor: Scarsz
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 200315
#### Variables #### #### Variables ####
@ -21,11 +21,19 @@ steampass="password"
ip="0.0.0.0" ip="0.0.0.0"
fn_parms(){ fn_parms(){
parms="-netlog -ip=${ip} -config=${servercfg}" parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}"
} }
#### Advanced Variables #### #### Advanced Variables ####
# ARMA 3 Modules
# add mods with relative paths:
# mods/\@CBA_A3\;
# or several mods as:
# mods/\@CBA_A3\;mods/\@task_force_radio
# and chmod modules directories to 775
mods=""
# Steam # Steam
appid="233780" appid="233780"
@ -42,9 +50,11 @@ filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}" systemdir="${filesdir}"
executabledir="${filesdir}" executabledir="${filesdir}"
executable="./arma3server" executable="./arma3server"
servercfgdir="${systemdir}" servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg" servercfg="${servicename}.server.cfg"
networkcfg="${servicename}.network.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
networkcfgfullpath="${servercfgdir}/${networkcfg}"
backupdir="${rootdir}/backups" backupdir="${rootdir}/backups"
# Logging # Logging
@ -72,7 +82,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

77
Arma3/cfg/lgsm-default.network.cfg

@ -0,0 +1,77 @@
//
// network.cfg - Defines network tuning parameters
//
// This file is to be passed to the -cfg parameter on the command line for the server
// See http://community.bistudio.com/wiki/basic.cfg
// The following settings are the suggested settings
// BANDWIDTH SETTINGS
// Bandwidth the server is guaranteed to have (in bps)
// General guideline is NumberOfPlayers * 256kb
// Default: 131072
MinBandwidth=5120000;
// Bandwidth the server can never go above (in bps)
// For a single server, use full network speed; decrease when running multiple servers
MaxBandwidth=10240000;
// PACKET SETTINGS
// Maximum number of packets per frame.
// Increasing the value potentially decreases lag, but increases desync
// Default: 128
MaxMsgSend=2048;
// Maximum payload of guaranteed packet (in b)
// Small messages are packed to larger packets
// Guaranteed packets are used for non-repetitive events, like shooting
// Lower value means more packets are sent, so less events will get combined
// Default: 512
MaxSizeGuaranteed=512;
// Maximum payload of non-guaranteed packet (in b)
// Increasing this value may improve bandwidth requirement, but may also increase lag
// Largest factor in desync
// Guidance is half of MaxSizeGuaranteed
// Default: 256
MaxSizeNonguaranteed=256;
// Maximal size of a packet sent over the network
// Only necessary if ISP forces lower packet size and there are connectivity issues
// Default: 1400
// class sockets{maxPacketSize=1400};
// SMOOTHNESS SETTINGS
// Minimal error required to send network updates for far units
// Smaller values will make for smoother movement at long ranges, but will increase network traffic
// Default: 0.003
MinErrorToSend=0.01;
// Minimal error required to send network updates for near units
// Using larger value can reduce traffic sent for near units
// Also controls client to server traffic
// Default: 0.01
MinErrorToSendNear=0.02;
// GEOLOCATION SETTINGS
// Server latitude
serverLatitude=52;
serverLatitudeAuto=52;
// Server Longitude
serverLongitude=0;
serverLongitudeAuto=0;
// MISC
// View Distance (not sure if this actually works)
viewDistance=10000;
// Maximum size (in b) for custom face or sound files
// Default: 0
MaxCustomFileSize=0;
// Server language
language="English";
steamLanguage="English";
// Adapter
adapter=-1;
// Windowed mode
Windowed=0;
3D_Performance=1.000000;

0
Arma3/cfg/lgsm-default.cfg → Arma3/cfg/lgsm-default.server.cfg

2
BladeSymphony/bsserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
CounterStrike/csserver

@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
CounterStrikeConditionZero/csczserver

@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
CounterStrikeGlobalOffensive/csgoserver

@ -95,7 +95,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
CounterStrikeSource/cssserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
DayOfDefeat/dodserver

@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
DayOfDefeatSource/dodsserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

0
HalfLifeDeathmatchClassic/cfg/lgsm-default.cfg → DeathmatchClassic/cfg/lgsm-default.cfg

97
DeathmatchClassic/dmcserver

@ -0,0 +1,97 @@
#!/bin/bash
# Deathmatch Classic
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
# Version: 150315
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
defaultmap="dcdm5"
maxplayers="16"
port="27015"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
fn_parms(){
parms="-game dmc -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
# Steam
appid="90 +app_set_config 90 mod dmc"
# Server Details
servicename="dmc-server"
gamename="Deathmatch Classic"
engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dmc"
executabledir="${filesdir}"
executable="./hlds_run"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

15
DoubleActionBoogaloo/cfg/lgsm-default.cfg

@ -0,0 +1,15 @@
// Server Name
hostname "hostname"
// RCON Password
rcon_password "rconpassword"
// Server Password
sv_password ""
// Server Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0

98
DoubleActionBoogaloo/dabserver

@ -0,0 +1,98 @@
#!/bin/bash
# Double Action: Boogaloo
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
# Version: 220315
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
defaultmap="da_rooftops"
maxplayers="10"
port="27015"
sourcetvport="27020"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
# Steam
appid="317800"
# Server Details
servicename="da-server"
gamename="Double Action: Boogaloo"
engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dab"
executabledir="${filesdir}"
executable="./dabds.sh"
servercfgdir="${systemdir}/cfg"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

BIN
DoubleActionBoogaloo/dependencies/libm.so.6

Binary file not shown.

2
FistfulOfFrags/fofserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

6
GarrysMod/cfg/lgsm-default.cfg

@ -65,7 +65,7 @@ sv_allowdownload 0
sbox_noclip 0 sbox_noclip 0
sbox_godmode 0 sbox_godmode 0
sbox_weapons 0 sbox_weapons 0
sbox_plpldamage 0 sbox_playershurtplayers 0
sbox_maxprops 100 sbox_maxprops 100
sbox_maxragdolls 50 sbox_maxragdolls 50
sbox_maxnpcs 10 sbox_maxnpcs 10
@ -79,10 +79,8 @@ sbox_maxhoverballs 20
sbox_maxvehicles 1 sbox_maxvehicles 1
sbox_maxbuttons 20 sbox_maxbuttons 20
sbox_maxemitters 0 sbox_maxemitters 0
sbox_maxspawners 0
sbox_maxturrets 0
// Misc Config // Misc Config
exec banned_user.cfg exec banned_user.cfg
exec banned_ip.cfg exec banned_ip.cfg
heartbeat heartbeat

7
GarrysMod/gmodserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 160315
#### Variables #### #### Variables ####
@ -23,6 +23,7 @@ workshopcollectionid=""
# Start Variables # Start Variables
defaultmap="gm_construct" defaultmap="gm_construct"
gamemode="sandbox"
maxplayers="16" maxplayers="16"
port="27015" port="27015"
sourcetvport="27020" sourcetvport="27020"
@ -31,7 +32,7 @@ ip="0.0.0.0"
# 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 garrysmod -strictportbind -ip ${ip} -port ${port} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
} }
#### Advanced Variables #### #### Advanced Variables ####
@ -83,7 +84,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
HalfLife2Deathmatch/hl2dmserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

35
HalfLifeDeathmatch/cfg/lgsm-default.cfg

@ -0,0 +1,35 @@
// Server Name
hostname "hostname"
// RCON Password
rcon_password "rconpassword"
// Server Password
sv_password ""
// Server Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0
// disable autoaim
sv_aim 0
// disable clients' ability to pause the server
pausable 0
// maximum client movement speed
sv_maxspeed 320
// 20 minute timelimit
mp_timelimit 20
// cheats off
sv_cheats 0
// load ban files
exec listip.cfg
exec banned.cfg

14
HalfLifeDeathmatchClassic/hldmcserver → HalfLifeDeathmatch/hldmserver

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
# Half Life: Deathmatch Classic # Half Life: Deathmatch
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://gameservermanagers.com
# Version: 210115 # Version: 150315
#### Variables #### #### Variables ####
@ -34,8 +34,8 @@ parms="-game valve -strictportbind -ip ${ip} -port ${port} +clientport ${clientp
appid="90" appid="90"
# Server Details # Server Details
servicename="hldmc-server" servicename="hldm-server"
gamename="Half Life: Deathmatch Classic" gamename="Half Life: Deathmatch"
engine="goldsource" engine="goldsource"
# Directories # Directories
@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1
@ -94,4 +94,4 @@ fn_runfunction
fn_functions fn_functions
getopt=$1 getopt=$1
fn_getopt fn_getopt

2
Insurgency/insserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
JustCause2/jc2server

@ -73,7 +73,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
KillingFloor/kfserver

@ -80,7 +80,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
Left4Dead/l4dserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
Left4Dead2/l4d2server

@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
NaturalSelection2/ns2server

@ -83,7 +83,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

171
NoMoreRoomInHell/cfg/lgsm-default.cfg

@ -1,15 +1,176 @@
// Server Name //*********************************************************************************
// *
// No More Room in Hell - Community Developed Server.cfg *
// Version 1.3 - March 7, 2015 *
// Version 1.0: http://avidblur.com/nmrih/server.cfg *
// Version 1.2: http://fastdl.zombiegaming.net/nmrih/cfg/server.cfg *
// Version 1.3: http://gameservermanagers.com/nmrih/server.cfg *
// *
// ********************************************************************************
// ............................ Basic Server Settings ............................. //
// The name of your server as you want it to show up on NMRiH's Server Browser
hostname "hostname" hostname "hostname"
// RCON Password // The contact email for your main server admin
sv_contact "[email protected]"
// Password for rcon (remote connection), can be left blank for no RCon, it's recommended that you make a secure password.
// Need a secure password? Check out https://www.grc.com/passwords.htm for automatically generated ones
rcon_password "rconpassword" rcon_password "rconpassword"
// Server Password // Makes your server private so only people with the password can play on it
sv_password "" sv_password ""
// Server Logging // The region of the world this server will report as being located in
// -1 = World
// 0 = US East Coast
// 1 = US West Coast
// 2 = South America
// 3 = Europe
// 4 = Asia
// 5 = Australia
// 6 = Middle East
// 7 = Africa
sv_region -1
// Is this server running on LAN or is it accessable to the world wide web?
// 0 = Internet
// 1 = Local Area Network
sv_lan 0
// Enable communication over voice via microphone
sv_voiceenable 1
// Players can hear all other players, no team restrictions 0=off 1=on
sv_alltalk 1
//Gameplay can be chosen between classic/normal, sv_difficulty casual is casual, sv_difficulty normal is normal
sv_difficulty casual
// Time spend on a single map (in minutes) before switching to a new one automatically
mp_timelimit 45
// Maximum number of rounds to spend on a map before moving to the next one
//mp_maxrounds 0
// Name of the .txt file containing a list of maps the server should cycle through
// mapcycle.txt - All maps
// mapcycle_objective.txt - Objective maps only
// mapcycle_survival.txt - Survival maps only
mapcyclefile "mapcycle.txt"
// A comma seperated list of tags that will show up in the server browser & make it easier for users to find the server they're looking for
// "Official" tags:
// custom - If your server is running custom gameplay settings/configs
// objective - If your server only cycles through objective maps
// survival - If your server only cycles through survival maps
// IE: sv_tags "example1, example2, example3"
sv_tags "objective, survival, vanilla"
// ............................ Download Settings .................................. //
// Allow clients to upload sprays etc (NMRiH has sprays disabled by default, so 0 might be the best option)
sv_allowupload 0
// Allow clients to download files
sv_allowdownload 1
// Maximum file size allowed for downloading individual maps/textures etc (Calculated in MB)
net_maxfilesize 64
// Allow downloading of maps/textures/etc from a website for faster download speeds!
// NOTE: If left blank (sv_downloadurl "") connecting clients will download custom maps etc directly from your Gameserver.
//
// Example: 1 - Game server has a map called "nmo_example.bsp" located in the map folder
// 2 - Web server has the exact same "nmo_example.bsp" file located at "http://www.yourwebsite.com/nmrih/maps/nmo_example.bsp"
// 3 - Therefore, sv_downloadurl should be set to "http://www.yourwebsite.com/nmrih/"
//
sv_downloadurl ""
// ............................ Performance Settings .............................. //
// Sets a limit to the frame rate that the server runs at (Set a framerate your server can consistently manage)
fps_max 66
// Min bandwidth rate allowed on server, 0 = Unlimited
sv_minrate 0
// Max bandwidth rate allowed on server, 0 = Unlimited
sv_maxrate 60000
//
net_splitpacket_maxrate 60000
sv_parallel_packentities 1
sv_parallel_sendsnapshot 1
// Use a high priority thread to send queued packets out instead of sending them each frame.
net_queued_packet_thread 1
// Max # of seconds we can wait for next packets to be sent based on rate setting (0 == no limit).
net_maxcleartime 0.01
// Minimum updates per second that the server will allow
sv_minupdaterate 66
// Maximum updates per second that the server will allow
sv_maxupdaterate 66
// Minimum commands per second that the server will allow
sv_mincmdrate 66
// Maximum commands per second that the server will allow
sv_maxcmdrate 66
sv_client_min_interp_ratio 0
sv_client_max_interp_ratio 4
sv_client_cmdrate_difference 0
// This can be used to force the value of cl_predict for connected clients (only while they are connected).
// -1 = let clients set cl_predict to anything
// 0 = force cl_predict to 0
// 1 = force cl_predict to 1
sv_client_predict 1
// .............................. Additional Settings .............................. //
// Allow the use of the "wait" command by clients? (Best left disabled to prevent the abuse of scripts - 0)
sv_allow_wait_command 0
// Enable logging? (off/on)
log on log on
sv_logbans 1 sv_logbans 1
sv_logecho 1 sv_logecho 1
sv_logfile 1 sv_logfile 1
sv_log_onefile 0 sv_log_onefile 0
// ............................... Sourcemod Settings .............................. //
// ********************************************************************************
// *
// Advanced Server Settings (Best left untouched!) *
// *
// ********************************************************************************
exec banned_user.cfg
exec banned_ip.cfg
//These commands will run on map change, sometimes a crash may wipe a recent ban from your banlist, this minimises that issue
writeid
writeip
//**********************************************************************************************************
// Master Server Settings
//**********************************************************************************************************
sv_master_legacy_mode 0 // Disable legacy mode, since steam master servers won't support it anymore
heartbeat // Send heartbeat that this server is ready. Should be the last line of the config
//**********************************************************************************************************
//-----End of Server.cfg-----

2
NoMoreRoomInHell/nmrihserver

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

35
OpposingForce/cfg/lgsm-default.cfg

@ -0,0 +1,35 @@
// Server Name
hostname "hostname"
// RCON Password
rcon_password "rconpassword"
// Server Password
sv_password ""
// Server Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0
// disable autoaim
sv_aim 0
// disable clients' ability to pause the server
pausable 0
// maximum client movement speed
sv_maxspeed 320
// 20 minute timelimit
mp_timelimit 20
// cheats off
sv_cheats 0
// load ban files
exec listip.cfg
exec banned.cfg

97
OpposingForce/opforserver

@ -0,0 +1,97 @@
#!/bin/bash
# Half-Life: Opposing Force
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
defaultmap="op4_bootcamp"
maxplayers="16"
port="27015"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
fn_parms(){
parms="-game gearbox -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
# Steam
appid="90 +app_set_config 90 mod gearbox"
# Server Details
servicename="opfor-server"
gamename="Half-Life: Opposing Force"
engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/gearbox"
executabledir="${filesdir}"
executable="./hlds_run"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

64
README.md

@ -1,38 +1,46 @@
<h1>Linux Game Server Manager - <a href="https://github.com/dgibbs64/linuxgameservers/issues?q=is%3Aopen+-label%3A%22non+script+issue%22+-label%3A%22server+request%22+-label%3Aenhancement">Issues</a></h1> <h1>Linux Game Server Managers_ <a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Install</a></h1>
<a href="http://gameservermanagers.com"><img src="http://wiki.gameservermanagers.com/w//images/9/9d/Lgsm_full-2.png" alt="linux Game Server Managers" width="600" /></a>
<a href="http://danielgibbs.co.uk/scripts"><img src="http://danielgibbs.co.uk/wp-content/uploads/2014/02/linux-game-server-manager-full.png" alt="linux game server manager" width="600" /></a>
The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice comms servers. The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice comms servers.
<h2>Main features</h2> <h2>Main features</h2>
<ul> <ul>
<li>Server installer (SteamCMD).</li> <li>Backup</li>
<li>Start/Stop/Restart server.</li> <li>Console</li>
<li>Server update (SteamCMD).</li> <li>Details</li>
<li>Server monitor (including email notification).</li> <li>Installer (SteamCMD)</li>
<li>Server backup.</li> <li>Monitor (including email notification)</li>
<li>Server console.</li> <li>Update (SteamCMD)</li>
<li>Start/Stop/Restart server</li>
</ul> </ul>
<h2>Compatibility</h2> <h2>Compatibility</h2>
The Linux Game Server Manager is tested to work on the following Linux systems. The Linux Game Server Managers are tested to work on the following Linux distros.
<ul> <ul>
<li>Debian based distros (Ubuntu, Mint etc.).</li> <li>Debian based (Ubuntu, Mint etc.).</li>
<li>Redhat based distros (CentOS, Fedora etc.).</li> <li>Redhat based (CentOS, Fedora etc.).</li>
</ul>
Other distros are likely to work but are not fully tested.
<h3>Specific Requirements</h3>
<ul>
<li><a href="http://wiki.gameservermanagers.com/wiki/Glibc">GLIBC</a> >= 2.15 recommended [<a href="http://wiki.gameservermanagers.com/wiki/Glibc#Server_Requirements">specific requirements</a>].</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Tmux">Tmux</a> >= 1.6 recommended (Avoid Tmux 1.8).</li>
</ul> </ul>
The scripts are written in BASH and Python and would probably work with other distros.
<h2>"I've found a bug", "Something isn't working for me"</h2>
Before submitting an issue about a script error, try deleting the "functions" folder located where the script is. (ie. /home/tf2/tf2server would be /home/tf2/functions)
This will grab the latest scripts from the repository meaning that if we've already fixed the bug you would be asking about, you'd get the patch that way.
<h2>FAQ</h2> <h2>FAQ</h2>
<strong>Q: How do I install a script on my Linux server?</strong> All FAQ can be found here.
- Full documentation and instructions can be found here.
<b><a href="http://danielgibbs.co.uk/scripts">http://danielgibbs.co.uk/lgsm</a></b>
<strong>Q: There's a feature that I'd like to see implemented, how can I get it put in?</strong>
- Create an issue report and we'll tag it as an enhancement, if you are able to program in Bash feel free to send us a pull request, it's much likely to be included as well as faster that way.
<strong>Q: Can you go on my server through SSH and install the server for me?</strong> <a href="http://wiki.gameservermanagers.com/wiki/FAQ">http://wiki.gameservermanagers.com/wiki/FAQ</a>
- Unfortunately, no, the scripts are very easy to install and shouldn't require much help in the first place. If there's a error that you're experiencing, send us an issue report. <h2>Donate</h2>
If you want to donate to the project you can via PayPal, Flattr or Gratipay. I have had a may kind people show there support by sending me a donation. Any donations you send help cover my server costs and buy me a drink. Cheers!
<ul>
<li><a href="http://gameservermanagers.com/#donate">Donate</a></li>
</ul>
<h2>Useful Links</h2>
<ul>
<li><a href="http://gameservermanagers.com">Homepage</li>
<li><a href="http://gameservermanagers.com">Wiki</li>
<li><a href="https://github.com/dgibbs64/linuxgsm">GitHub Code</li>
<li><a href="https://github.com/dgibbs64/linuxgsm/issues">GitHub Issues</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Steam Group</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Twitter</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Facebook</li>
<li><a href="http://wiki.gameservermanagers.com/wiki/Getting_Started">Google+</li>
</ul>

2
RedOrchestra/roserver

@ -76,7 +76,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

35
Ricochet/cfg/lgsm-default.cfg

@ -0,0 +1,35 @@
// Server Name
hostname "hostname"
// RCON Password
rcon_password "rconpassword"
// Server Password
sv_password ""
// Server Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0
// disable autoaim
sv_aim 0
// disable clients' ability to pause the server
pausable 0
// maximum client movement speed
sv_maxspeed 320
// 20 minute timelimit
mp_timelimit 20
// cheats off
sv_cheats 0
// load ban files
exec listip.cfg
exec banned.cfg

97
Ricochet/ricochetserver

@ -0,0 +1,97 @@
#!/bin/bash
# Ricochet
# Server Management Script
# Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk
# Version: 210115
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="[email protected]"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
defaultmap="rc_arena"
maxplayers="16"
port="27015"
clientport="27005"
ip="0.0.0.0"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2
fn_parms(){
parms="-game ricochet -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
# Steam
appid="90 +app_set_config 90 mod ricochet"
# Server Details
servicename="ricochet-server"
gamename="Ricochet"
engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/ricochet"
executabledir="${filesdir}"
executable="./hlds_run"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="${rootdir}/backups"
# Logging
logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"
scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
##### Script #####
# Do not edit
fn_runfunction(){
# Functions are downloaded and run with this function
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
cd "${rootdir}"
if [ ! -d "functions" ]; then
mkdir functions
fi
cd functions
echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}"
cd "${rootdir}"
sleep 1
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt

4
SeriousSam3BFE/ss3sserver

@ -19,7 +19,7 @@ steampass="password"
# Start Variables # Start Variables
ip="0.0.0.0" ip="0.0.0.0"
# https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/SeriousSam3BFE/help/DedicatedServer_Readme.txt # https://raw.githubusercontent.com/dgibbs64/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}"
} }
@ -74,7 +74,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
StarBound/sbserver

@ -73,7 +73,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
TeamFortress2/tf2server

@ -78,7 +78,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
TeamFortressClassic/tfcserver

@ -77,7 +77,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

2
TeamSpeak3/ts3server

@ -52,7 +52,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

6
UnrealTournament2004/ut2k4server

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 070215
#### Variables #### #### Variables ####
@ -27,7 +27,7 @@ engine="unreal2"
# Directories # Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename 0)" selfname="$(basename $0)"
lockselfname=".${servicename}.lock" lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles" filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System" systemdir="${filesdir}/System"
@ -67,7 +67,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

6
UnrealTournament99/ut99server

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 070215
#### Variables #### #### Variables ####
@ -29,7 +29,7 @@ engine="unreal"
# Directories # Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename 0)" selfname="$(basename $0)"
lockselfname=".${servicename}.lock" lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles" filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System" systemdir="${filesdir}/System"
@ -66,7 +66,7 @@ if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
fi fi
cd functions cd functions
echo -e "loading ${functionfile}...\c" echo -e "loading ${functionfile}...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
chmod +x "${functionfile}" chmod +x "${functionfile}"
cd "${rootdir}" cd "${rootdir}"
sleep 1 sleep 1

5
functions/fn_check_tmux

@ -2,7 +2,7 @@
# LGSM fn_check_tmux function # LGSM fn_check_tmux function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 140215 # Version: 110315
# Checks if tmux is installed as too many users do not RTFM or know how to use Google. # Checks if tmux is installed as too many users do not RTFM or know how to use Google.
@ -12,6 +12,7 @@ if [ -z "$(command -v tmux)" ]; then
fn_scriptlog "Tmux is not installed" fn_scriptlog "Tmux is not installed"
echo " * Tmux is required to run this server." echo " * Tmux is required to run this server."
# Suitable passive agressive message # Suitable passive agressive message
echo " * Please see 'Prerequisites' section of installation instructions." echo " * Please see the the following link."
echo " * http://gameservermanagers.com/dependencies"
exit exit
fi fi

4
functions/fn_getopt

@ -2,7 +2,7 @@
# LGSM fn_getopt function # LGSM fn_getopt function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 080214 # Version: 150314
# Description: getopt arguments. # Description: getopt arguments.
@ -56,6 +56,8 @@ case "$getopt" in
fn_stop;; fn_stop;;
restart) restart)
fn_restart;; fn_restart;;
update)
fn_update_check;;
backup) backup)
fn_backup;; fn_backup;;
monitor) monitor)

4
functions/fn_install

@ -2,7 +2,7 @@
# LGSM fn_install function # LGSM fn_install function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 080215 # Version: 060315
fn_check_root fn_check_root
fn_install_header fn_install_header
@ -40,6 +40,6 @@ elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
fn_install_ut2k4fix fn_install_ut2k4fix
elif [ "${gamename}" == "Unreal Tournament 99" ]; then elif [ "${gamename}" == "Unreal Tournament 99" ]; then
fn_install_99fix fn_install_ut99fix
fi fi
fn_install_complete fn_install_complete

61
functions/fn_install_config

@ -1,11 +1,13 @@
#!/bin/bash #!/bin/bash
# LGSM fn_server function # LGSM fn_server function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://gameservermanagers.com
# Version: 210115 # Version: 220315
fn_arma3config(){ fn_arma3config(){
cp -v lgsm-default.cfg "${servercfgfullpath}" mkdir -pv "${servercfgdir}"
mv -v lgsm-default.server.cfg "${servercfgfullpath}"
mv -v lgsm-default.network.cfg "${networkcfgfullpath}"
sleep 1 sleep 1
echo "" echo ""
} }
@ -131,72 +133,83 @@ echo ""
echo "Creating Configs" echo "Creating Configs"
echo "=================================" echo "================================="
sleep 1 sleep 1
cd "${servercfgdir}" if [ "${gamename}" == "ARMA 3" ]; then
cd "${systemdir}"
else
cd "${servercfgdir}"
fi
#statements
if [ "${gamename}" == "7 Days To Die" ]; then if [ "${gamename}" == "7 Days To Die" ]; then
fn_unity3dconfig fn_unity3dconfig
elif [ "${gamename}" == "ARMA 3" ]; then elif [ "${gamename}" == "ARMA 3" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.server.cfg & lgsm-default.network.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Arma3/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.server.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Arma3/cfg/lgsm-default.network.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_arma3config fn_arma3config
elif [ "${gamename}" == "Blade Symphony" ]; then elif [ "${gamename}" == "Blade Symphony" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/BladeSymphony/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Counter Strike 1.6" ]; then elif [ "${gamename}" == "Counter Strike 1.6" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrike/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Counter Strike: Condition Zero" ]; then elif [ "${gamename}" == "Counter Strike: Condition Zero" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeConditionZero/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeGlobalOffensive/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Counter Strike: Source" ]; then elif [ "${gamename}" == "Counter Strike: Source" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/CounterStrikeSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Day of Defeat" ]; then elif [ "${gamename}" == "Day of Defeat" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeat/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Day of Defeat: Source" ]; then elif [ "${gamename}" == "Day of Defeat: Source" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DayOfDefeatSource/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1
fn_sourceconfig
elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/DoubleActionBoogaloo/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
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 --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/FistfulOfFrags/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Garry's Mod" ]; then elif [ "${gamename}" == "Garry's Mod" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/GarrysMod/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then elif [ "${gamename}" == "Half Life 2: Deathmatch" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLife2Deathmatch/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Half Life: Deathmatch Classic" ]; then elif [ "${gamename}" == "Half Life: Deathmatch Classic" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/HalfLifeDeathmatchClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/HalfLifeDeathmatchClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Insurgency" ]; then elif [ "${gamename}" == "Insurgency" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Insurgency/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Just Cause 2" ]; then elif [ "${gamename}" == "Just Cause 2" ]; then
@ -205,17 +218,17 @@ elif [ "${gamename}" == "Killing Floor" ]; then
fn_unreal2config fn_unreal2config
elif [ "${gamename}" == "Left 4 Dead" ]; then elif [ "${gamename}" == "Left 4 Dead" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Left 4 Dead 2" ]; then elif [ "${gamename}" == "Left 4 Dead 2" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Left4Dead2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
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 --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/NoMoreRoomInHell/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Natural Selection 2" ]; then elif [ "${gamename}" == "Natural Selection 2" ]; then
@ -226,17 +239,17 @@ elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
fn_unreal2config fn_unreal2config
elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
echo -e "downloading lgsm-default.ini...\c" echo -e "downloading lgsm-default.ini...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/SeriousSam3BFE/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_serious3config fn_serious3config
elif [ "${gamename}" == "Team Fortress 2" ]; then elif [ "${gamename}" == "Team Fortress 2" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortress2/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_sourceconfig fn_sourceconfig
elif [ "${gamename}" == "Team Fortress Classic" ]; then elif [ "${gamename}" == "Team Fortress Classic" ]; then
echo -e "downloading lgsm-default.cfg...\c" echo -e "downloading lgsm-default.cfg...\c"
wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq wget -N --no-check-certificate /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq
sleep 1 sleep 1
fn_goldsourceconfig fn_goldsourceconfig
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then elif [ "${gamename}" == "Unreal Tournament 2004" ]; then

28
functions/fn_install_glibcfix

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# LGSM fn_install_glibcfix function # LGSM fn_install_glibcfix function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://gameservermanagers.com
# Version: 210115 # Version: 220315
fn_glibcfixmsg(){ fn_glibcfixmsg(){
echo "" echo ""
@ -52,42 +52,48 @@ elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
# Double Action: Boogaloo
elif [ "${gamename}" == "Double Action: Boogaloo" ]; then
glibcversion="2.15"
fn_glibcfixmsg
cd "${filesdir}"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/blob/master/DoubleActionBoogaloo/dependencies/libm.so.6
# Fistful of Frags # Fistful of Frags
elif [ "${gamename}" == "Fistful of Frags" ]; then elif [ "${gamename}" == "Fistful of Frags" ]; then
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cd "${filesdir}" cd "${filesdir}"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/FistfulOfFrags/dependencies/libm.so.6
# Garry's Mod # Garry's Mod
elif [ "${gamename}" == "Garry's Mod" ]; then elif [ "${gamename}" == "Garry's Mod" ]; then
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cd "${filesdir}/bin" cd "${filesdir}/bin"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
# Insurgency # Insurgency
elif [ "${gamename}" == "Insurgency" ]; then elif [ "${gamename}" == "Insurgency" ]; then
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cd "${filesdir}/bin" cd "${filesdir}/bin"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/Insurgency/dependencies/libpthread.so.0
# Natural Selection 2 # Natural Selection 2
elif [ "${gamename}" == "Natural Selection 2" ]; then elif [ "${gamename}" == "Natural Selection 2" ]; then
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cd "${filesdir}" cd "${filesdir}"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
# No More Room in Hell # No More Room in Hell
elif [ "${gamename}" == "No More Room in Hell" ]; then elif [ "${gamename}" == "No More Room in Hell" ]; then
glibcversion="2.15" glibcversion="2.15"
fn_glibcfixmsg fn_glibcfixmsg
cd "${filesdir}" cd "${filesdir}"
wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6 wget -nv -N --no-check-certificate https://github.com/dgibbs64/linuxgsm/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
# if Glibc less than 1.13 # if Glibc less than 1.13
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 213 ]; then elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 213 ]; then

5
functions/fn_install_ut99fix

@ -2,7 +2,7 @@
# LGSM fn_install_ut99fix function # LGSM fn_install_ut99fix function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 070215
echo "Applying ${gamename} Server Fixes" echo "Applying ${gamename} Server Fixes"
echo "=================================" echo "================================="
@ -16,6 +16,9 @@ echo "MasterServerPort=27900"
echo "Region=0" echo "Region=0"
}|tee -a "${servercfgfullpath}" > /dev/null 2>&1 }|tee -a "${servercfgfullpath}" > /dev/null 2>&1
sleep 1 sleep 1
echo "removing dead gamespy.com master server."
sed -i '/master0.gamespy.com/d' "${servercfgfullpath}"
sleep 1
echo "removing dead mplayer.com master server." echo "removing dead mplayer.com master server."
sed -i '/master.mplayer.com/d' "${servercfgfullpath}" sed -i '/master.mplayer.com/d' "${servercfgfullpath}"
sleep 1 sleep 1

4
functions/fn_monitor

@ -69,8 +69,10 @@ if [ ! -f "${lockselfname}" ]; then
echo "To enable monitor run ${selfname} start" echo "To enable monitor run ${selfname} start"
exit exit
fi fi
updatecheck=$(ps -ef|grep "${selfname} update"|grep -v grep|wc -l) updatecheck=$(ps -ef|grep "${selfname} update"|grep -v grep|wc -l)
if [ "${updatecheck}" = "0" ]; then if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 2004" ]; then
fn_printdots "Checking session: CHECKING" fn_printdots "Checking session: CHECKING"
fn_scriptlog "Checking session: CHECKING" fn_scriptlog "Checking session: CHECKING"
sleep 1 sleep 1

17
functions/fn_monitor_query

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# LGSM fn_monitor_query function # LGSM fn_monitor_query function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://gameservermanagers.com
# Version: 210115 # Version: 220315
# Description: uses gsquery.py to directly query the server. # Description: uses gsquery.py to directly query the server.
# Detects if the server has frozen. # Detects if the server has frozen.
@ -35,9 +35,16 @@ if [ -f gsquery.py ]; then
sleep 1 sleep 1
echo -en "\n" echo -en "\n"
if [[ -z "${secondquery}" ]]; then if [[ -z "${secondquery}" ]]; then
fn_printinfo "Waiting 30 seconds to re-query" if [ "${engine}" == "unreal2" ]; then
fn_scriptlog "Waiting 30 seconds to re-query" # unreal 2: Map change can take around 60 seconds
sleep 30 fn_printinfo "Waiting 60 seconds to re-query"
fn_scriptlog "Waiting 60 seconds to re-query"
sleep 60
else
fn_printinfo "Waiting 30 seconds to re-query"
fn_scriptlog "Waiting 30 seconds to re-query"
sleep 30
fi
secondquery=1 secondquery=1
fn_monitor_query fn_monitor_query
fi fi

291
functions/fn_update_check

@ -2,20 +2,115 @@
# LGSM fn_update_check function # LGSM fn_update_check function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 150315
# Description: Checks if a server update is available. # Description: Checks if a server update is available.
local modulename="Update" local modulename="Update"
### SteamCMD Update Checker ###
fn_appmanifestinfo(){
appmanifestfile=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf")
appmanifestfilewc=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf"|wc -l)
}
fn_appmanifestcheck(){
fn_appmanifestinfo
# Multiple or no matching appmanifest files may sometimes be available.
# This is an error is corrected below if required.
if [ "${appmanifestfilewc}" -ge "2" ]; then
sleep 1
fn_printwarn "Multiple appmanifest_${appid}.acf files found"
fn_scriptlog "Warning! Multiple appmanifest_${appid}.acf files found"
sleep 2
fn_printdots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files"
sleep 1
for appfile in ${appmanifestfile}; do
rm "${appfile}"
done
appmanifestfilewc1="${appmanifestfilewc}"
fn_appmanifestinfo
if [ "${appmanifestfilewc}" -ge "2" ]; then
fn_printfail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
fn_scriptlog "Failure! Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
sleep 1
echo ""
echo " Check user permissions"
for appfile in ${appmanifestfile}; do
echo " ${appfile}"
done
exit
else
sleep 1
fn_printok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
fn_scriptlog "Success! Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
sleep 1
fn_printinfonl "Forcing update to correct issue"
fn_scriptlog "Forcing update to correct issue"
sleep 1
fn_update_dl
fn_update_check
fi
elif [ "${appmanifestfilewc}" -eq "0" ]; then
fn_printwarn "No appmanifest_${appid}.acf found"
fn_scriptlog "Warning! No appmanifest_${appid}.acf found"
sleep 2
fn_printinfonl "Forcing update to correct issue"
fn_scriptlog "Forcing update to correct issue"
sleep 1
fn_update_dl
fn_update_check
fi
}
fn_logupdaterequest(){
# Checks for server update requests from server logs.
echo ""
fn_printdots "Checking for update: Server logs"
sleep 1
fn_printok "Checking for update: Server logs"
fn_scriptlog "Checking for update: Server logs"
sleep 1
requestrestart=$(grep -sc "MasterRequestRestart" "${consolelog}")
if [ "${requestrestart}" -ge "1" ]; then
fn_printoknl "Server requesting update"
sleep 1
echo ""
echo -ne "Applying update.\r"
sleep 1
echo -ne "Applying update..\r"
sleep 1
echo -ne "Applying update...\r"
sleep 1
echo -ne "\n"
if [ ! -z "${norestart}" ]; then
fn_update_dl
else
fn_stop
fn_update_dl
fn_start
fi
else
fn_printok "Checking for update: Server logs: No update requested"
sleep 1
fi
echo ""
}
fn_steamcmdcheck(){ fn_steamcmdcheck(){
fn_appmanifestcheck
# Checks for server update from SteamCMD # Checks for server update from SteamCMD
fn_printdots "Checking for update: SteamCMD" fn_printdots "Checking for update: SteamCMD"
fn_scriptlog "Checking for update: SteamCMD" fn_scriptlog "Checking for update: SteamCMD"
sleep 1 sleep 1
# Gets currentbuild
currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) currentbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
# Gets availablebuild info
cd "${rootdir}/steamcmd" cd "${rootdir}/steamcmd"
availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_print ${appid} +app_info_print ${appid} +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"public\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
if [ -z "${availablebuild}" ]; then if [ -z "${availablebuild}" ]; then
fn_printfail "Checking for update: SteamCMD" fn_printfail "Checking for update: SteamCMD"
fn_scriptlog "Failure! Checking for update: SteamCMD" fn_scriptlog "Failure! Checking for update: SteamCMD"
@ -29,30 +124,6 @@ else
sleep 1 sleep 1
fi fi
if [ -z "${availablebuild}" ]; then
# Checks for server update from SteamDB.info if SteamCMD fails
echo ""
fn_printdots "Checking for update: SteamDB.info"
fn_scriptlog "Checking for update: SteamDB.info"
availablebuild=$(wget -qO- "http://steamdb.info/api/GetRawDepots/?appid=${appid}" | sed 's/\\n/\n/g' | grep -EA 1000 "^\s+\[branches\]" | grep -EA 5 "^\s+\[public\]" | grep -m 1 -EB 10 "^\s+\)$" | grep -E "^\s+\[buildid\]\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f4)
sleep 1
if [ -z "${availablebuild}" ]; then
fn_printfail "Checking for update: SteamDB.info"
fn_scriptlog "Failure! Checking for update: SteamDB.info"
sleep 1
fn_printfail "Checking for update: SteamDB.info: Not returning version info"
fn_scriptlog "Failure! Checking for update: SteamDB.info: Not returning version info"
sleep 2
else
fn_printok "Checking for update: SteamDB.info"
fn_scriptlog "Success! Checking for update: SteamDB.info"
sleep 1
fi
fi
if [ -z "${availablebuild}" ]; then
fn_logupdaterequest
fi
if [ "${currentbuild}" -ne "${availablebuild}" ]; then if [ "${currentbuild}" -ne "${availablebuild}" ]; then
echo -e "\n" echo -e "\n"
echo -e "Update available:" echo -e "Update available:"
@ -94,96 +165,110 @@ else
fi fi
} }
fn_logupdaterequest(){ ### END SteamCMD Update Checker ###
# Checks for server update requests from server logs.
echo "" fn_teamspeak3_check(){
fn_printdots "Checking server logs for update requests" # Checks for server update from teamspeak.com using a mirror dl.4players.de
sleep 1 fn_printdots "Checking for update: teamspeak.com"
fn_printok "Checking server logs for update requests" fn_scriptlog "Checking for update: teamspeak.com"
fn_scriptlog "Checking server logs for update requests"
sleep 1 sleep 1
requestrestart=$(grep -sc "MasterRequestRestart" "${consolelog}")
if [ "${requestrestart}" -ge "1" ]; then # Gets currentbuild info
fn_printoknl "Server requesting update" # Checks currentbuild info is available, if fails a server restart will be forced to generate logs
sleep 1 if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
echo "" fn_printfail "Checking for update: teamspeak.com"
echo -ne "Applying update.\r" fn_scriptlog "Checking for update: teamspeak.com"
sleep 1
echo -ne "Applying update..\r"
sleep 1
echo -ne "Applying update...\r"
sleep 1 sleep 1
echo -ne "\n" fn_printfailnl "Checking for update: teamspeak.com: No logs with server version found"
if [ ! -z "${norestart}" ]; then fn_scriptlog "Failure! Checking for update: teamspeak.com: No logs with server version found"
fn_update_dl sleep 2
else fn_printinfonl "Checking for update: teamspeak.com: Forcing server restart"
fn_stop fn_scriptlog "Checking for update: teamspeak.com: Forcing server restart"
fn_update_dl sleep 2
fn_start ./${selfname} restart
sleep 2
# If still failing will exit
if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
fn_printfailnl "Checking for update: teamspeak.com: Still No logs with server version found"
fn_scriptlog "Failure! Checking for update: teamspeak.com: Still No logs with server version found"
exit
fi fi
else
fn_printok "No update request detected"
sleep 1
fi fi
echo "" currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
exit
}
# Gets the teamspeak server architecture
ts3arch=$(ls $(find ${filesdir}/ -name 'ts3server_*_*' 2> /dev/null | grep -v 'ts3server_minimal_runscript.sh' | sort | tail -1) | egrep -o '(amd64|x86)' | tail -1)
fn_appmanifestinfo(){ # Gets availablebuild info
appmanifestfile=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf") wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers.tmp
appmanifestfilewc=$(find "${filesdir}" -type f -name "appmanifest_${appid}.acf"|wc -l) # Finds directory with most recent server version.
} while read ts3_version_number; do
wget --spider -q "http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz"
if [[ $? == 0 ]]; then
availablebuild="${ts3_version_number}"
# Break while-loop, if the latest release could be found
break
fi
done < .ts3_version_numbers.tmp
rm .ts3_version_numbers.tmp
fn_appmanifestcheck(){ # Checks availablebuild info is available
fn_appmanifestinfo if [ -z "${availablebuild}" ]; then
# Multiple or no matching appmanifest files may sometimes be available. fn_printfail "Checking for update: teamspeak.com"
# This is an error is corrected below if required. fn_scriptlog "Checking for update: teamspeak.com"
if [ "${appmanifestfilewc}" -ge "2" ]; then
sleep 1 sleep 1
fn_printwarn "Multiple appmanifest_${appid}.acf files found" fn_printfail "Checking for update: teamspeak.com: Not returning version info"
fn_scriptlog "Warning! Multiple appmanifest_${appid}.acf files found" fn_scriptlog "Failure! Checking for update: teamspeak.com: Not returning version info"
sleep 2 sleep 2
fn_printdots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" exit
else
fn_printok "Checking for update: teamspeak.com"
fn_scriptlog "Success! Checking for update: teamspeak.com"
sleep 1 sleep 1
for appfile in ${appmanifestfile}; do fi
rm "${appfile}"
done # Removes dots so if can compare version numbers
appmanifestfilewc1="${appmanifestfilewc}" currentbuilddigit=$(echo "${currentbuild}"|tr -cd "[:digit:]")
fn_appmanifestinfo availablebuilddigit=$(echo "${availablebuild}"|tr -cd "[:digit:]")
if [ "${appmanifestfilewc}" -ge "2" ]; then if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then
fn_printfail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" echo -e "\n"
fn_scriptlog "Failure! Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" echo -e "Update available:"
sleep 1 sleep 1
echo "" echo -e " Current build: \e[0;31m${currentbuild} ${architecture}\e[0;39m"
echo " Check user permissions" echo -e " Available build: \e[0;32m${availablebuild} ${architecture}\e[0;39m"
for appfile in ${appmanifestfile}; do echo -e ""
echo " ${appfile}" sleep 1
done echo ""
exit echo -en "Applying update.\r"
else
sleep 1
fn_printok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
fn_scriptlog "Success! Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
sleep 1
fn_printinfonl "Forcing update to correct issue"
fn_scriptlog "Forcing update to correct issue"
sleep 1
fn_update_dl
fn_update_check
fi
elif [ "${appmanifestfilewc}" -eq "0" ]; then
fn_printwarn "No appmanifest_${appid}.acf found"
fn_scriptlog "Warning! No appmanifest_${appid}.acf found"
sleep 2
fn_printinfonl "Forcing update to correct issue"
fn_scriptlog "Forcing update to correct issue"
sleep 1 sleep 1
echo -en "Applying update..\r"
sleep 1
echo -en "Applying update...\r"
sleep 1
echo -en "\n"
fn_scriptlog "Update available"
fn_scriptlog "Current build: ${currentbuild}"
fn_scriptlog "Available build: ${availablebuild}"
fn_scriptlog "${currentbuild} > ${availablebuild}"
fn_stop
fn_update_dl fn_update_dl
fn_update_check fn_start
else
echo -e "\n"
echo -e "No update available:"
echo -e " Current version: \e[0;32m${currentbuild}\e[0;39m"
echo -e " Available version: \e[0;32m${availablebuild}\e[0;39m"
echo -e ""
fn_printoknl "No update available"
fn_scriptlog "Current build: ${currentbuild}"
fn_scriptlog "Available build: ${availablebuild}"
fi fi
} }
fn_printdots "Checking for update" fn_printdots "Checking for update"
fn_appmanifestcheck if [ "${gamename}" == "Teamspeak 3" ]; then
fn_steamcmdcheck fn_teamspeak3_check
else
fn_logupdaterequest
fn_steamcmdcheck
fi

63
functions/fn_update_dl

@ -2,11 +2,13 @@
# LGSM fn_update_dl function # LGSM fn_update_dl function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 210115 # Version: 150315
# Description: Runs a server update. # Description: Runs a server update.
local modulename="Update" local modulename="Update"
fn_steamcmd_dl(){
fn_check_root fn_check_root
fn_check_systemdir fn_check_systemdir
fn_details_config fn_details_config
@ -18,4 +20,61 @@ fn_scriptlog "Updating ${servername}"
sleep 1 sleep 1
cd "${rootdir}" cd "${rootdir}"
cd "steamcmd" cd "steamcmd"
./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit|tee -a "${scriptlog}" ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit|tee -a "${scriptlog}"
}
fn_teamspeak3_dl(){
fn_check_root
fn_check_systemdir
fn_details_config
fn_printdots "Updating ${servername}"
sleep 1
fn_printoknl "Updating ${servername}"
fn_scriptlog "Updating ${servername}"
sleep 1
cd ${rootdir}
echo -e "downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
fn_scriptlog "Downloading teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz"
wget -N --no-check-certificate /dev/null http://dl.4players.de/ts/releases/${ts3_version_number}/teamspeak3-server_linux-${ts3arch}-${ts3_version_number}.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
sleep 1
echo -e "extracting teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz...\c"
fn_scriptlog "Extracting teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz"
tar -xf "teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz" 2> "${scriptlogdir}/.${servicename}-tar-error.tmp"
local status=$?
if [ ${status} -eq 0 ]; then
echo "OK"
else
echo "FAIL - Exit status ${status}"
fn_scriptlog "Failed to extract - Exit status ${status}"
sleep 1
cat "${scriptlogdir}/.${servicename}-tar-error.tmp"
cat "${scriptlogdir}/.${servicename}-tar-error.tmp" >> "${scriptlog}"
rm "${scriptlogdir}/.${servicename}-tar-error.tmp"
fn_scriptlog "Failure! Unable to update"
exit
fi
echo -e "copying to ${filesdir}...\c"
fn_scriptlog "Copying to ${filesdir}"
cp -R ${rootdir}/teamspeak3-server_linux-${ts3arch}/* "${filesdir}" 2> "${scriptlogdir}/.${servicename}-cp-error.tmp"
local status=$?
if [ ${status} -eq 0 ]; then
echo "OK"
else
echo "FAIL - Exit status ${status}"
fn_scriptlog "Failed to copy - Exit status ${status}"
sleep 1
cat "${scriptlogdir}/.${servicename}-cp-error.tmp"
cat "${scriptlogdir}/.${servicename}-cp-error.tmp" >> "${scriptlog}"
rm "${scriptlogdir}/.${servicename}-cp-error.tmp"
fn_scriptlog "Failure! Unable to update"
exit
fi
rm -f teamspeak3-server_linux-${ts3arch}-${availablebuild}.tar.gz
rm -rf ${rootdir}/teamspeak3-server_linux-${ts3arch}
}
if [ "${gamename}" == "Teamspeak 3" ]; then
fn_teamspeak3_dl
else
fn_steamcmd_dl
fi

Loading…
Cancel
Save