diff --git a/.travis.yml b/.travis.yml index f91811da3..d385c27fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: bash -sudo: false +sudo: required env: - DISTRO=ubuntu-trusty diff --git a/7DaysToDie/sdtdserver b/7DaysToDie/sdtdserver index 1dc5ff4b6..6ca116aa7 100644 --- a/7DaysToDie/sdtdserver +++ b/7DaysToDie/sdtdserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: 7 Days To Die | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,13 +24,12 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | http://7daystodie.gamepedia.com/Server fn_parms(){ parms="-logfile ${gamelogdir}/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" } diff --git a/ARKSurvivalEvolved/arkserver b/ARKSurvivalEvolved/arkserver index a7683daf3..da408b353 100644 --- a/ARKSurvivalEvolved/arkserver +++ b/ARKSurvivalEvolved/arkserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: ARK: Survival Evolved | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,18 +23,15 @@ version="161224" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -servername="ark-server" -port="7778" +port="7777" queryport="27015" -rconport="32330" -rconpassword="" # Set to enable rcon -maxplayers="50" +rconport="27020" +maxplayers="70" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ -parms="\"TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}\"" +parms="\"TheIsland?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?\"" } #### LinuxGSM Settings #### @@ -82,7 +79,7 @@ githubbranch="master" ## LinuxGSM Server Details # Do not edit -gamename="ARK: Survivial Evolved" +gamename="ARK: Survival Evolved" engine="unreal4" ## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers diff --git a/Arma3/arma3server b/Arma3/arma3server index 54f91c82c..8d6dcb210 100644 --- a/Arma3/arma3server +++ b/Arma3/arma3server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: ARMA 3 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,7 +24,7 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" @@ -46,7 +46,6 @@ servermods="" bepath="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="-netlog -ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" } diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 16e41986e..51b8dfcc0 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Battlefield: 1942 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -22,7 +22,7 @@ version="161224" #### Server Settings #### -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ parms="+hostServer 1 +dedicated 1" } diff --git a/BlackMesa/bmdmserver b/BlackMesa/bmdmserver index 54cf8d0e1..1b6c9d573 100644 --- a/BlackMesa/bmdmserver +++ b/BlackMesa/bmdmserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Black Mesa: Deathmatch | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -36,7 +36,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/BladeSymphony/bsserver b/BladeSymphony/bsserver index ab472f35f..38c71ce1e 100644 --- a/BladeSymphony/bsserver +++ b/BladeSymphony/bsserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Blade Symphony | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,7 +24,7 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="duel_winter" @@ -35,7 +35,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/BrainBread2/bb2server b/BrainBread2/bb2server index 7812e584e..df5034bb8 100644 --- a/BrainBread2/bb2server +++ b/BrainBread2/bb2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: BrainBread 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,7 +23,7 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login # Steam login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="bba_barracks" @@ -39,7 +39,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/CallOfDuty/codserver b/CallOfDuty/codserver index 1fb6daf02..d78cbaece 100755 --- a/CallOfDuty/codserver +++ b/CallOfDuty/codserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Call of Duty | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/CallOfDuty2/cod2server b/CallOfDuty2/cod2server index f90fae26b..db4f07af9 100755 --- a/CallOfDuty2/cod2server +++ b/CallOfDuty2/cod2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Call of Duty 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,7 +23,6 @@ version="161224" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - defaultmap="mp_leningrad" maxclients="20" port="28960" diff --git a/CallOfDuty4/cod4server b/CallOfDuty4/cod4server index 699c3b7ad..6b4a0260e 100644 --- a/CallOfDuty4/cod4server +++ b/CallOfDuty4/cod4server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Call of Duty 4 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,7 +23,6 @@ version="161224" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - defaultmap="mp_crossfire" maxclients="32" port="28960" diff --git a/CallOfDutyUnitedOffensive/coduoserver b/CallOfDutyUnitedOffensive/coduoserver index 29c1d6776..c3d71ae8a 100755 --- a/CallOfDutyUnitedOffensive/coduoserver +++ b/CallOfDutyUnitedOffensive/coduoserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Call of Duty: United Offensive | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,7 +23,6 @@ version="161224" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - defaultmap="mp_cassino" maxclients="20" port="28960" diff --git a/CallOfDutyWorldAtWar/codwawserver b/CallOfDutyWorldAtWar/codwawserver index 961105a3d..5e3681ead 100755 --- a/CallOfDutyWorldAtWar/codwawserver +++ b/CallOfDutyWorldAtWar/codwawserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Call of Duty: World at War | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -23,7 +23,6 @@ version="161224" #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - defaultmap="mp_castle" maxclients="20" port="28960" diff --git a/CodenameCURE/ccserver b/CodenameCURE/ccserver index 5583d4480..3196b993c 100644 --- a/CodenameCURE/ccserver +++ b/CodenameCURE/ccserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Codename CURE | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,12 +14,14 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## ########################## +#### Server Settings #### + ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="cbe_bunker" maxplayers="6" @@ -29,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game cure -insecure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/CounterStrike/csserver b/CounterStrike/csserver index d161759cf..4add519a6 100644 --- a/CounterStrike/csserver +++ b/CounterStrike/csserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Counter-Strike | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/CounterStrikeConditionZero/csczserver b/CounterStrikeConditionZero/csczserver index e6831dc3a..8333438b9 100644 --- a/CounterStrikeConditionZero/csczserver +++ b/CounterStrikeConditionZero/csczserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Counter-Strike: Condition Zero | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 8ab616e5b..8a306dc03 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Counter-Strike: Global Offensive | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -27,7 +27,7 @@ version="161224" # [Game Modes] gametype gamemode # Arms Race 1 0 # Classic Casual 0 0 -# Classic Competitive 0 1 +# Classic Competitive 0 1 # Demolition 1 1 # Deathmatch 1 2 gametype="0" @@ -54,7 +54,6 @@ gslt="" # ws_start_map="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_mode ${gamemode} +game_type ${gametype} +host_workshop_collection ${ws_collection_id} +workshop_start_map ${ws_start_map} -authkey ${authkey}" } diff --git a/CounterStrikeSource/cssserver b/CounterStrikeSource/cssserver index aae064a3b..bdee401bb 100644 --- a/CounterStrikeSource/cssserver +++ b/CounterStrikeSource/cssserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Counter-Strike: Source | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -37,7 +37,6 @@ updateonstart="off" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/DayOfDefeat/dodserver b/DayOfDefeat/dodserver index 1c4dea80b..efe5861f8 100644 --- a/DayOfDefeat/dodserver +++ b/DayOfDefeat/dodserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Day of Defeat | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ ip="0.0.0.0" updateonstart="off" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/DayOfDefeatSource/dodsserver b/DayOfDefeatSource/dodsserver index f1f23e0b9..3508e0686 100644 --- a/DayOfDefeatSource/dodsserver +++ b/DayOfDefeatSource/dodsserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Day of Defeat: Source | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | ttps://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/DayOfInfamy/doiserver b/DayOfInfamy/doiserver index ff4e57238..5d2ed38fe 100644 --- a/DayOfInfamy/doiserver +++ b/DayOfInfamy/doiserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Day of Infamy | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -33,7 +33,6 @@ ip="0.0.0.0" workshop="0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop}" } diff --git a/DeathmatchClassic/dmcserver b/DeathmatchClassic/dmcserver index e9af4107a..4ef098e91 100644 --- a/DeathmatchClassic/dmcserver +++ b/DeathmatchClassic/dmcserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Deathmatch Classic | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | 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}" } diff --git a/DontStarveTogether/dstserver b/DontStarveTogether/dstserver index 8001e4a7d..99239c49a 100644 --- a/DontStarveTogether/dstserver +++ b/DontStarveTogether/dstserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Dont Starve Together | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/DoubleActionBoogaloo/dabserver b/DoubleActionBoogaloo/dabserver index add4c4256..245cd0c59 100644 --- a/DoubleActionBoogaloo/dabserver +++ b/DoubleActionBoogaloo/dabserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Double Action: Boogaloo | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | 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}" } diff --git a/EmpiresMod/emserver b/EmpiresMod/emserver index 8fe3b4164..36cb92f5a 100644 --- a/EmpiresMod/emserver +++ b/EmpiresMod/emserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Empires Mod | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -36,7 +36,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/Factorio/fctrserver b/Factorio/fctrserver new file mode 100644 index 000000000..8843668e4 --- /dev/null +++ b/Factorio/fctrserver @@ -0,0 +1,190 @@ +#!/bin/bash +# Project: Game Server Managers - LinuxGSM +# Author: Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs +# Purpose: Factorio | Server Management Script +# Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors +# Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki +# Website: https://gameservermanagers.com + +# Debugging +if [ -f ".dev-debug" ]; then + exec 5>dev-debug.log + BASH_XTRACEFD="5" + set -x +fi + +version="170110" + +########################## +######## Settings ######## +########################## + +#### Server Settings #### + +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters +port="34197" +rconport="34198" +rconpassword="CHANGE_ME" +ip="0.0.0.0" + +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters +fn_parms(){ +parms="--start-server ${filesdir}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +} + +#### LinuxGSM Settings #### + +## Notification Alerts +# (on|off) +# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update +updateonstart="off" + +## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging +consolelogging="on" +logdays="7" + +#### LinuxGSM Advanced Settings #### + +## Github Branch Select +# Allows for the use of different function files +# from a different repo and/or branch. +githubuser="GameServerManagers" +githubrepo="LinuxGSM" +githubbranch="master" + +## LinuxGSM Server Details +# Do not edit +gamename="Factorio" +engine="factorio" + +## Service Name | https://github.com/GameServerManagers/LinuxGSM/wiki/Multiple-Servers +servicename="fctr-server" + +#### Directories #### +# Edit with care + +## Work 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" +tmpdir="${lgsmdir}/tmp" +filesdir="${rootdir}/serverfiles" + +## Server Specific Directories +systemdir="${filesdir}" +executabledir="${filesdir}/bin/x64" +executable="./factorio" +servercfg="${servicename}.json" +servercfgdefault="server-settings.json" +servercfgdir="${filesdir}/data" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${rootdir}/backups" + +## Logging Directories +gamelogdir="${filesdir}" +scriptlogdir="${rootdir}/log/script" +consolelogdir="${rootdir}/log/console" +scriptlog="${scriptlogdir}/${servicename}-script.log" +consolelog="${consolelogdir}/${servicename}-console.log" +emaillog="${scriptlogdir}/${servicename}-email.log" + +## Logs Naming +scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%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 +} + +# Prevent from running this script as root. +if [ "$(whoami)" = "root" ]; then + if [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]||[ ! -f "${functionsdir}/core_exit.sh" ]; then + echo "[ FAIL ] Do NOT run this script as root!" + exit 1 + else + core_functions.sh + check_root.sh + fi +fi + +core_dl.sh +core_functions.sh +getopt=$1 +core_getopt.sh \ No newline at end of file diff --git a/FistfulOfFrags/fofserver b/FistfulOfFrags/fofserver index 314edb0d7..988a1b680 100644 --- a/FistfulOfFrags/fofserver +++ b/FistfulOfFrags/fofserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Fistful Of Frags | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 42c220387..c432c6769 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Garry's Mod | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -46,7 +46,6 @@ customparms="+r_hunkalloclightmaps 0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}" } diff --git a/GoldenEyeSource/gesserver b/GoldenEyeSource/gesserver index 8ecd7a8c2..d1520cc35 100644 --- a/GoldenEyeSource/gesserver +++ b/GoldenEyeSource/gesserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: GoldenEye: Source | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -22,7 +22,7 @@ version="161224" #### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="ge_archives" maxplayers="16" port="27015" @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game gesource -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/HalfLife2Deathmatch/hl2dmserver b/HalfLife2Deathmatch/hl2dmserver index f4da627f3..b5a15f78c 100644 --- a/HalfLife2Deathmatch/hl2dmserver +++ b/HalfLife2Deathmatch/hl2dmserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Half Life 2: Deathmatch | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/HalfLifeDeathmatch/hldmserver b/HalfLifeDeathmatch/hldmserver index 2a8cf8ce7..8ba1b8d01 100644 --- a/HalfLifeDeathmatch/hldmserver +++ b/HalfLifeDeathmatch/hldmserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Half Life: Deathmatch | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/HalfLifeDeathmatchSource/hldmsserver b/HalfLifeDeathmatchSource/hldmsserver index ebe71cc57..c25dc3fbf 100644 --- a/HalfLifeDeathmatchSource/hldmsserver +++ b/HalfLifeDeathmatchSource/hldmsserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Half-Life Deathmatch: Source | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/Hurtworld/hwserver b/Hurtworld/hwserver index b1a6f2a81..43a6e465f 100644 --- a/Hurtworld/hwserver +++ b/Hurtworld/hwserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Hurtworld | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/Insurgency/insserver b/Insurgency/insserver index dd7f3b6dd..eac3777c3 100644 --- a/Insurgency/insserver +++ b/Insurgency/insserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Insurgency | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -33,7 +33,6 @@ ip="0.0.0.0" workshop="0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_workshop_enabled ${workshop} -norestart" } diff --git a/JustCause2/jc2server b/JustCause2/jc2server index a49f23584..626df4b3a 100644 --- a/JustCause2/jc2server +++ b/JustCause2/jc2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Just Cause 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,17 +14,13 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## ########################## -#### Server Settings #### -# No settings available for Just Cause 2 - ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="" } diff --git a/KillingFloor/kfserver b/KillingFloor/kfserver index 167348f93..baca47dcc 100644 --- a/KillingFloor/kfserver +++ b/KillingFloor/kfserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Killing Floor | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,16 +24,17 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="KF-BioticsLab.rom" ip="0.0.0.0" +## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" -# Start Variables for Objective mode +# Server Start Command for Objective mode #defaultmap="KFO-Steamland" #parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" } @@ -203,4 +204,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/LICENSE b/LICENSE index 24a57533c..c6ad3cd89 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Daniel Gibbs +Copyright (c) 2017 Daniel Gibbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Left4Dead/l4dserver b/Left4Dead/l4dserver index b3aab5c06..2216a5f93 100644 --- a/Left4Dead/l4dserver +++ b/Left4Dead/l4dserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Left 4 Dead | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/Left4Dead2/l4d2server b/Left4Dead2/l4d2server index a3a5d4166..496444a20 100644 --- a/Left4Dead2/l4d2server +++ b/Left4Dead2/l4d2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Left 4 Dead 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/Minecraft/mcserver b/Minecraft/mcserver index 4fbb94103..82999f5a3 100644 --- a/Minecraft/mcserver +++ b/Minecraft/mcserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Minecraft | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -26,7 +26,6 @@ version="161224" javaram="1024" # -Xmx$1024M ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="nogui" } diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index 47ca299b7..6dd9eb2d3 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Mumble | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,7 +24,6 @@ version="161224" # Use .ini config file for Mumble (Murmur) server. ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="-fg -ini ${servercfgfullpath}" } diff --git a/NS2Combat/ns2cserver b/NS2Combat/ns2cserver index d8abe3459..c1b39d836 100644 --- a/NS2Combat/ns2cserver +++ b/NS2Combat/ns2cserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: NS2: Combat | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,7 +24,7 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="co_core" @@ -42,7 +42,6 @@ password="" # -password \"${password}\" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | http://wiki.unknownworlds.com/ns2/Dedicated_Server fn_parms(){ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" } @@ -208,4 +207,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/NaturalSelection2/ns2server b/NaturalSelection2/ns2server index 55b4876c2..bc01063c2 100644 --- a/NaturalSelection2/ns2server +++ b/NaturalSelection2/ns2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Natural Selection 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,7 +24,7 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="ns2_summit" @@ -42,7 +42,6 @@ password="" # -password \"${password}\" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | http://wiki.unknownworlds.com/ns2/Dedicated_Server fn_parms(){ parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" } @@ -208,4 +207,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/NoMoreRoomInHell/nmrihserver b/NoMoreRoomInHell/nmrihserver index a88526007..5a925ea54 100644 --- a/NoMoreRoomInHell/nmrihserver +++ b/NoMoreRoomInHell/nmrihserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: No More Room in Hell | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -36,7 +36,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game nmrih -insecure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/OpposingForce/opforserver b/OpposingForce/opforserver index c164da28e..945f353d4 100644 --- a/OpposingForce/opforserver +++ b/OpposingForce/opforserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Half-Life: Opposing Force | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | 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}" } diff --git a/PiratesVikingandKnightsII/pvkiiserver b/PiratesVikingandKnightsII/pvkiiserver index 1fdb643b0..6a715b7b9 100644 --- a/PiratesVikingandKnightsII/pvkiiserver +++ b/PiratesVikingandKnightsII/pvkiiserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: No More Room in Hell | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/ProjectZomboid/pzserver b/ProjectZomboid/pzserver index 3dcc89927..c39c86f5e 100644 --- a/ProjectZomboid/pzserver +++ b/ProjectZomboid/pzserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Project Zomboid | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/Quake2/q2server b/Quake2/q2server index 8694b7ec9..a1ff9bb75 100644 --- a/Quake2/q2server +++ b/Quake2/q2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Quake 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/Quake3/q3server b/Quake3/q3server index 5aebdaf1e..1a64eeb1b 100644 --- a/Quake3/q3server +++ b/Quake3/q3server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Quake 3: Arena | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/QuakeLive/qlserver b/QuakeLive/qlserver index 42e8fca97..73047718d 100755 --- a/QuakeLive/qlserver +++ b/QuakeLive/qlserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Quake Live | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/QuakeWorld/qwserver b/QuakeWorld/qwserver index 488103ae4..1b92190e3 100644 --- a/QuakeWorld/qwserver +++ b/QuakeWorld/qwserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Quake World (nQuake) | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -27,7 +27,6 @@ port="27500" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-port ${port} -game ktx +exec ${servercfg}" } diff --git a/RedOrchestra/roserver b/RedOrchestra/roserver index 9371398fd..0812c7f41 100644 --- a/RedOrchestra/roserver +++ b/RedOrchestra/roserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Red Orchestra: Ostfront 41-45 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,14 +24,13 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="RO-Arad.rom" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" } @@ -205,4 +204,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/Ricochet/ricochetserver b/Ricochet/ricochetserver index 4eff098cb..16d9fca81 100644 --- a/Ricochet/ricochetserver +++ b/Ricochet/ricochetserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Ricochet | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -22,7 +22,7 @@ version="161224" #### Server Settings #### -# Start Variables +## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters defaultmap="rc_arena" maxplayers="16" port="27015" @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | 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}" } @@ -41,10 +40,6 @@ parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clie #### Server Settings #### -## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login -steamuser="username" -steampass="password" - ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" @@ -54,7 +49,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="" } diff --git a/Rust/rustserver b/Rust/rustserver index 071680a86..aa740f8b1 100644 --- a/Rust/rustserver +++ b/Rust/rustserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Rust | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -38,7 +38,6 @@ saveinterval="300" # Auto-save in seconds tickrate="30" # default 30; range : 15 to 100 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Rust_Dedicated_Server fn_parms(){ parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile ${gamelogfile}" } diff --git a/SeriousSam3BFE/ss3sserver b/SeriousSam3BFE/ss3sserver index f4ca338b7..33487a651 100644 --- a/SeriousSam3BFE/ss3sserver +++ b/SeriousSam3BFE/ss3sserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Sam 3: BFE | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/Starbound/sbserver b/Starbound/sbserver index 6fba61b59..899d846dc 100644 --- a/Starbound/sbserver +++ b/Starbound/sbserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Starbound | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,13 +24,12 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="" } @@ -197,4 +196,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/SvenCoop/svenserver b/SvenCoop/svenserver index e75a16af0..10e27db1b 100644 --- a/SvenCoop/svenserver +++ b/SvenCoop/svenserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Sven Co-op | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/TeamFortress2/tf2server b/TeamFortress2/tf2server index f0173fece..bbc242d0b 100644 --- a/TeamFortress2/tf2server +++ b/TeamFortress2/tf2server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Team Fortress 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -36,7 +36,6 @@ ip="0.0.0.0" gslt="" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" } diff --git a/TeamFortressClassic/tfcserver b/TeamFortressClassic/tfcserver index d77647fb0..6c3a7d9eb 100644 --- a/TeamFortressClassic/tfcserver +++ b/TeamFortressClassic/tfcserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Team Fortress Classic | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -30,7 +30,6 @@ clientport="27005" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } diff --git a/TeamSpeak3/ts3server b/TeamSpeak3/ts3server index aeab10ecc..d1d97c172 100644 --- a/TeamSpeak3/ts3server +++ b/TeamSpeak3/ts3server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: TeamSpeak 3 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/Teeworlds/twserver b/Teeworlds/twserver index c525a3cc2..d0de5a1d0 100644 --- a/Teeworlds/twserver +++ b/Teeworlds/twserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Teeworlds | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,13 +24,12 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="-f ${servercfgfullpath}" } @@ -198,4 +197,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 867dcfd0b..a155828eb 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Terraria | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -24,13 +24,12 @@ version="161224" ## SteamCMD Login | https://github.com/GameServerManagers/LinuxGSM/wiki/SteamCMD#steamcmd-login steamuser="username" -steampass="password" +steampass='password' ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="-config ${servercfgfullpath}" } @@ -197,4 +196,4 @@ fi core_dl.sh core_functions.sh getopt=$1 -core_getopt.sh \ No newline at end of file +core_getopt.sh diff --git a/UnrealTournament/utserver b/UnrealTournament/utserver index 54ec900da..e95414adc 100644 --- a/UnrealTournament/utserver +++ b/UnrealTournament/utserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Unreal Tournament | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -31,7 +31,6 @@ ip="0.0.0.0" port="7777" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" } diff --git a/UnrealTournament2004/ut2k4server b/UnrealTournament2004/ut2k4server index 751bdf4fa..0b49bd361 100644 --- a/UnrealTournament2004/ut2k4server +++ b/UnrealTournament2004/ut2k4server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Unreal Tournament 2004 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -27,7 +27,6 @@ defaultmap="DM-Rankin" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care | fn_parms(){ parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" } diff --git a/UnrealTournament3/ut3server b/UnrealTournament3/ut3server index aaf89b698..8a839fc92 100644 --- a/UnrealTournament3/ut3server +++ b/UnrealTournament3/ut3server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Unreal Tournament 3 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## diff --git a/UnrealTournament99/ut99server b/UnrealTournament99/ut99server index ebf871439..fff7c8cb4 100644 --- a/UnrealTournament99/ut99server +++ b/UnrealTournament99/ut99server @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Unreal Tournament 99 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -27,7 +27,6 @@ defaultmap="DM-Deck16][" ip="0.0.0.0" ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="server ${defaultmap}.unr ini=${servercfgfullpath}" } diff --git a/WolfensteinEnemyTerritory/wetserver b/WolfensteinEnemyTerritory/wetserver index 30894d50c..07ec5b7d9 100644 --- a/WolfensteinEnemyTerritory/wetserver +++ b/WolfensteinEnemyTerritory/wetserver @@ -1,7 +1,7 @@ #!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: Enemy Territory | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -14,7 +14,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -22,11 +22,7 @@ version="161224" #### Server Settings #### -## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters -# Please use Enemy Territory config file. - ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="+set net_strict 1 +set fs_homepath ${filesdir} +exec ${servercfg}" } diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 0279a9ede..16df3860e 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -92,7 +92,7 @@ fn_found_missing_deps(){ sleep 1 echo -en " \r" if [ -n "$(command -v dpkg-query)" ]; then - cmd="sudo dpkg --add-architecture i386; sudo apt-get -y install ${array_deps_missing[@]}" + cmd="sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get -y install ${array_deps_missing[@]}" eval ${cmd} elif [ -n "$(command -v yum)" ]; then cmd="sudo yum -y install ${array_deps_missing[@]}" @@ -110,7 +110,7 @@ fn_found_missing_deps(){ fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies." fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies." if [ -n "$(command -v dpkg-query)" ]; then - echo " sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" + echo " sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get install ${array_deps_missing[@]}" elif [ -n "$(command -v yum)" ]; then echo " sudo yum install ${array_deps_missing[@]}" fi @@ -147,7 +147,7 @@ if [ -n "$(command -v dpkg-query)" ]; then array_deps_missing=() # LGSM requirements - array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip ) + array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip ) # All servers except ts3 require tmux if [ "${gamename}" != "TeamSpeak 3" ]; then @@ -202,6 +202,9 @@ if [ -n "$(command -v dpkg-query)" ]; then # GoldenEye: Source elif [ "${gamename}" == "GoldenEye: Source" ]; then array_deps_required+=( zlib1g:i386 libldap-2.4-2:i386 ) + # Serious Sam 3: BFE + elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then + array_deps_required+=( libxrandr2:i386 libglu1-mesa:i386 libxtst6:i386 libusb-1.0-0-dev:i386 libxxf86vm1:i386 libopenal1:i386 libssl1.0.0:i386 libgtk2.0-0:i386 libdbus-glib-1-2:i386 libnm-glib-dev:i386 ) # Unreal Engine elif [ "${executable}" == "./ucc-bin" ]; then #UT2K4 @@ -224,9 +227,9 @@ elif [ -n "$(command -v yum)" ]; then # LGSM requirements if [ "${distroversion}" == "6" ]; then - array_deps_required=( curl wget util-linux-ng python file gzip bzip2 ) + array_deps_required=( curl wget util-linux-ng python file gzip bzip2 unzip ) else - array_deps_required=( curl wget util-linux python file gzip bzip2 ) + array_deps_required=( curl wget util-linux python file gzip bzip2 unzip ) fi # All servers except ts3 require tmux diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 20a36afea..25b73a70b 100644 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -31,7 +31,7 @@ fn_check_steamcmd_user(){ fn_script_log_info "Using anonymous Steam login." fi steamuser="anonymous" - steampass="" + steampass='' sleep 1 fi } diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 3be04f541..a4333f041 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -314,16 +314,16 @@ fn_details_ports(){ echo -e "Change ports by editing the parameters in:" parmslocation="${red}UNKNOWN${default}" - # engines that require editing in the config file - local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "RenderWare" ) + # engines/games that require editing in the config file + local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "RenderWare" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" ) for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then parmslocation="${servercfgfullpath}" fi done - # engines that require editing in the script file - local ports_edit_array=( "Hurtworld" "iw3.0" "goldsource" "Rust" "spark" "source" "starbound" "unreal4" ) + # engines/games that require editing in the script file + local ports_edit_array=( "goldsource" "Factorio" "Hurtworld" "iw3.0" "Rust" "spark" "source" "starbound" "unreal4" "realvirtuality") for port_edit in "${ports_edit_array[@]}" do if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then @@ -345,8 +345,24 @@ fn_details_statusbottom(){ echo -e "" } + # Engine Specific details +fn_details_ark(){ + echo -e "netstat -atunp | grep ShooterGame" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> RAW\tINBOUND\t$((port+1))\tudp" + fi + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + } | column -s $'\t' -t +} + fn_details_avalanche(){ echo -e "netstat -atunp | grep Jcmp-Server" echo -e "" @@ -413,52 +429,56 @@ fn_details_dontstarve(){ } | column -s $'\t' -t } -fn_details_minecraft(){ - echo -e "netstat -atunp | grep java" +fn_details_factorio(){ + echo -e "netstat -atunp | grep factorio" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Game\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t } -fn_details_projectzomboid(){ - echo -e "netstat -atunp | grep java" +fn_details_goldsource(){ + echo -e "netstat -atunp | grep hlds_linux" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" + echo -e "< Client\tOUTBOUND\t${clientport}\tudp" } | column -s $'\t' -t } +fn_details_hurtworld(){ + echo -e "netstat -atunp | grep Hurtworld" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/RCON\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} -fn_details_realvirtuality(){ - echo -e "netstat -atunp | grep arma3server" +fn_details_minecraft(){ + echo -e "netstat -atunp | grep java" echo -e "" - if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then - echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}." - echo -e "" - fi { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" - echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" - echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" } | column -s $'\t' -t } -fn_details_refractor(){ - echo -e "netstat -atunp | grep bf1942_lnxd" +fn_details_mumble(){ + echo -e "netstat -atunp | grep murmur" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" - echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" + echo -e "> Voice\tINBOUND\t${port}\tudp" + echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" } | column -s $'\t' -t } -fn_details_quake2(){ - echo -e "netstat -atunp | grep quake2" +fn_details_projectzomboid(){ + echo -e "netstat -atunp | grep java" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" @@ -466,8 +486,8 @@ fn_details_quake2(){ } | column -s $'\t' -t } -fn_details_quake3(){ - echo -e "netstat -atunp | grep q3ded" +fn_details_quake(){ + echo -e "netstat -atunp | grep mvdsv" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" @@ -475,8 +495,17 @@ fn_details_quake3(){ } | column -s $'\t' -t } -fn_details_quake(){ - echo -e "netstat -atunp | grep mvdsv" +fn_details_quake2(){ + echo -e "netstat -atunp | grep quake2" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + +fn_details_quake3(){ + echo -e "netstat -atunp | grep q3ded" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" @@ -499,15 +528,44 @@ fn_details_quakelive(){ } | column -s $'\t' -t } -fn_details_wolfensteinenemyterritory(){ - echo -e "netstat -atunp | grep etded" +fn_details_realvirtuality(){ + echo -e "netstat -atunp | grep arma3server" + echo -e "" + # Default port + if [ -z "${port}" ]; then + port="2302" + fi + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tudp" + # Don't do arithmetics if ever the port wasn't a numeric value + if [ "${port}" -eq "${port}" ]; then + echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp" + echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp" + echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp" + fi + } | column -s $'\t' -t +} + +fn_details_refractor(){ + echo -e "netstat -atunp | grep bf1942_lnxd" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game/Query\tINBOUND\t${port}\tudp" + echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" } | column -s $'\t' -t } +fn_details_rust(){ + echo -e "netstat -atunp | grep Rust" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + } | column -s $'\t' -t +} fn_details_seriousengine35(){ echo -e "netstat -atunp | grep Sam3_Dedicate" @@ -519,15 +577,41 @@ fn_details_seriousengine35(){ } | column -s $'\t' -t } +fn_details_sdtd(){ + echo -e "netstat -atunp | grep 7DaysToDie" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/RCON\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" + echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} WebAdmin${default}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = + { + echo -e "${blue}WebAdmin enabled:\t${default}${webadminenabled}" + echo -e "${blue}WebAdmin url:\t${default}http://${ip}:${webadminport}" + echo -e "${blue}WebAdmin password:\t${default}${webadminpass}" + } | column -s $'\t' -t + echo -e "" + echo -e "${lightgreen}${servername} Telnet${default}" + printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = + { + echo -e "${blue}Telnet enabled:\t${default}${telnetenabled}" + echo -e "${blue}Telnet address:\t${default}${ip} ${telnetport}" + echo -e "${blue}Telnet password:\t${default}${telnetpass}" + } | column -s $'\t' -t +} + fn_details_source(){ echo -e "netstat -atunp | grep srcds_linux" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" - if [ -n "${sourcetvport}" ]; then - echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" - fi + echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" echo -e "< Client\tOUTBOUND\t${clientport}\tudp" } | column -s $'\t' -t } @@ -573,16 +657,6 @@ fn_details_teamspeak3(){ } | column -s $'\t' -t } -fn_details_mumble(){ - echo -e "netstat -atunp | grep murmur" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Voice\tINBOUND\t${port}\tudp" - echo -e "> ServerQuery\tINBOUND\t${port}\ttcp" - } | column -s $'\t' -t -} - fn_details_teeworlds(){ echo -e "netstat -atunp | grep teeworlds_srv" echo -e "" @@ -601,54 +675,6 @@ fn_details_terraria(){ } | column -s $'\t' -t } -fn_details_sdtd(){ - echo -e "netstat -atunp | grep 7DaysToDie" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" - echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} WebAdmin${default}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = - { - echo -e "${blue}WebAdmin enabled:\t${default}${webadminenabled}" - echo -e "${blue}WebAdmin url:\t${default}http://${ip}:${webadminport}" - echo -e "${blue}WebAdmin password:\t${default}${webadminpass}" - } | column -s $'\t' -t - echo -e "" - echo -e "${lightgreen}${servername} Telnet${default}" - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = - { - echo -e "${blue}Telnet enabled:\t${default}${telnetenabled}" - echo -e "${blue}Telnet address:\t${default}${ip} ${telnetport}" - echo -e "${blue}Telnet password:\t${default}${telnetpass}" - } | column -s $'\t' -t -} - -fn_details_hurtworld(){ - echo -e "netstat -atunp | grep Hurtworld" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/RCON\tINBOUND\t${port}\tudp" - echo -e "> Query\tINBOUND\t${queryport}\tudp" - } | column -s $'\t' -t -} - -fn_details_rust(){ - echo -e "netstat -atunp | grep Rust" - echo -e "" - { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - } | column -s $'\t' -t -} - fn_details_unreal(){ echo -e "netstat -atunp | grep ucc-bin" echo -e "" @@ -696,13 +722,12 @@ fn_details_ut3(){ } | column -s $'\t' -t } -fn_details_ark(){ - echo -e "netstat -atunp | grep ShooterGame" +fn_details_wolfensteinenemyterritory(){ + echo -e "netstat -atunp | grep etded" echo -e "" { - echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" - echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" - echo -e "> Query\tINBOUND\t${queryport}\tudp" + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" } | column -s $'\t' -t } @@ -747,6 +772,8 @@ fn_display_details() { fn_details_refractor elif [ "${engine}" == "dontstarve" ]; then fn_details_dontstarve + elif [ "${engine}" == "goldsource" ]; then + fn_details_goldsource elif [ "${engine}" == "lwjgl2" ]; then fn_details_minecraft elif [ "${engine}" == "projectzomboid" ]; then @@ -755,7 +782,7 @@ fn_display_details() { fn_details_realvirtuality elif [ "${engine}" == "seriousengine35" ]; then fn_details_seriousengine35 - elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then + elif [ "${engine}" == "source" ]; then fn_details_source elif [ "${engine}" == "spark" ]; then fn_details_spark @@ -771,7 +798,7 @@ fn_display_details() { fn_details_ut3 elif [ "${gamename}" == "7 Days To Die" ]; then fn_details_sdtd - elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then + elif [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_details_ark elif [ "${gamename}" == "Call of Duty" ]; then fn_details_cod @@ -783,6 +810,8 @@ fn_display_details() { fn_details_cod4 elif [ "${gamename}" == "Call of Duty: World at War" ]; then fn_details_codwaw + elif [ "${gamename}" == "Factorio" ]; then + fn_details_factorio elif [ "${gamename}" == "Hurtworld" ]; then fn_details_hurtworld elif [ "${gamename}" == "QuakeWorld" ]; then @@ -795,14 +824,14 @@ fn_display_details() { fn_details_quakelive elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_details_teamspeak3 + elif [ "${gamename}" == "Multi Theft Auto" ]; then + fn_details_mta elif [ "${gamename}" == "Mumble" ]; then fn_details_mumble elif [ "${gamename}" == "Rust" ]; then fn_details_rust elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then fn_details_wolfensteinenemyterritory - elif [ "${gamename}" == "Multi Theft Auto" ]; then - fn_details_mta else fn_print_error_nl "Unable to detect server engine." fi diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index e58ed8f6a..0d5f95213 100644 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -18,7 +18,7 @@ check_deps.sh if [ "${gamename}" == "Unreal Tournament 2004" ]; then install_server_files.sh install_ut2k4_key.sh -elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty 4" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]||[ "${gamename}" == "Multi Theft Auto" ]; then +elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty 4" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "Factorio" ]||[ "${gamename}" == "Minecraft" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament" ]||[ "${gamename}" == "Unreal Tournament 3" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then installer=1 install_server_files.sh elif [ -n "${appid}" ]; then diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 664b1c66b..566d5c323 100644 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -36,7 +36,7 @@ posttarget=${posttarget="https://hastebin.com"} # For pastebin, you can set the expiration period. # use 1 week as the default, other options are '24h' for a day, etc. # This, too, may be overridden from the command line at the top-level -postexpire="${postexpire="1W"}" +postexpire="${postexpire="30D"}" # This file sources the command_details.sh file to leverage all # of the already-defined functions. To keep the command_details.sh @@ -128,7 +128,7 @@ if [ "${posttarget}" == "http://pastebin.com" ] ; then fn_print_ok_nl "Posting details to pastbin.com for ${postexpire}" echo " Please share the following url for support: ${posttarget}${link}" elif [ "${posttarget}" == "https://hastebin.com" ] ; then - fn_print_dots "Posting details to hastebin.com (expires 30 days after last view)" + fn_print_dots "Posting details to hastebin.com" sleep 1 # hastebin is a bit simpler. If successful, the returned result # should look like: {"something":"key"}, putting the reference that diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 4175ee5dd..dda42c19a 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -58,6 +58,24 @@ fn_stop_graceful_goldsource(){ fn_stop_tmux } +fn_stop_graceful_factorio(){ + fn_print_dots "Graceful: console CTRL+c" + fn_script_log_info "Graceful: console CTRL+c" + # sends quit + tmux send-keys C-c -t "${servicename}" > /dev/null 2>&1 + # waits 3 seconds as goldsource servers restart with the quit command + for seconds in {1..3}; do + sleep 1 + fn_print_dots "Graceful: console CTRL+c: ${seconds}" + done + fn_print_ok "Graceful: console CTRL+c: ${seconds}: " + fn_print_ok_eol_nl + fn_script_log_pass "Graceful: console CTRL+c: OK: ${seconds} seconds" + sleep 1 + fn_stop_tmux +} + + # Attempts graceful of 7 Days To Die using telnet. fn_stop_telnet_sdtd(){ sdtd_telnet_shutdown=$( expect -c ' @@ -203,6 +221,8 @@ fn_stop_graceful_mta(){ fn_stop_graceful_select(){ if [ "${gamename}" == "7 Days To Die" ]; then fn_stop_graceful_sdtd + elif [ "${gamename}" == "Factorio" ]; then + fn_stop_graceful_factorio elif [ "${engine}" == "source" ]; then fn_stop_graceful_source elif [ "${engine}" == "goldsource" ]; then @@ -306,7 +326,7 @@ fn_stop_tmux(){ rm -f "${rootdir}/${lockselfname}" # ARK doesn't clean up immediately after tmux is killed. # Make certain the ports are cleared before continuing. - if [ "${gamename}" == "ARK: Survivial Evolved" ]; then + if [ "${gamename}" == "ARK: Survival Evolved" ]; then fn_stop_ark echo -en "\n" fi diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index bffa4e6ea..13fff9e90 100644 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -19,6 +19,8 @@ elif [ "${engine}" == "lwjgl2" ]; then update_minecraft.sh elif [ "${gamename}" == "Mumble" ]; then update_mumble.sh +elif [ "${gamename}" == "Factorio" ]; then + update_factorio.sh else update_steamcmd.sh fi diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 0037185b4..6125ed513 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -54,4 +54,4 @@ if [ "${status}" != "0" ]; then else fn_validation fi -core_exit.sh \ No newline at end of file +core_exit.sh diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index e7f73621c..7596c4789 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -117,7 +117,7 @@ fn_fetch_file(){ # trap to remove part downloaded files trap fn_fetch_trap INT # if larger file shows progress bar - if [ ${filename##*.} == "bz2" ]||[ ${filename##*.} == "jar" ]; then + if [ ${filename##*.} == "bz2" ]||[ ${filename##*.} == "gz" ]||[ ${filename##*.} == "zip" ]||[ ${filename##*.} == "jar" ]; then echo -ne "downloading ${filename}..." sleep 1 curlcmd=$(${curlcmd} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index a7f5e2805..77fff799f 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -6,7 +6,9 @@ # This function is called first before any other function. Without this file other functions will not load. # Fixes for legacy code -if [ "${gamename}" == "Teamspeak 3" ]; then +if [ "${gamename}" == "ARK: Survivial Evolved" ]; then + gamename="ARK: Survival Evolved" +elif [ "${gamename}" == "Teamspeak 3" ]; then gamename="TeamSpeak 3" elif [ "${gamename}" == "Counter Strike: Global Offensive" ]; then gamename="Counter-Strike: Global Offensive" @@ -450,6 +452,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +update_factorio.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + update_steamcmd.sh(){ functionfile="${FUNCNAME}" fn_fetch_function @@ -480,6 +487,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +install_factorio_save.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + install_dst_token.sh(){ functionfile="${FUNCNAME}" fn_fetch_function @@ -510,6 +522,11 @@ functionfile="${FUNCNAME}" fn_fetch_function } +install_unreal_tournament_eula.sh(){ +functionfile="${FUNCNAME}" +fn_fetch_function +} + install_retry.sh(){ functionfile="${FUNCNAME}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index 86dbdbc73..416427ae8 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -80,6 +80,73 @@ case "${getopt}" in esac } +fn_getopt_generic_update_no_steam(){ +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;; + pd|postdetails) + command_postdetails.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|detect-deps) + command_dev_detect_deps.sh;; + dg|detect-glibc) + command_dev_detect_glibc.sh;; + dl|detect-ldd) + command_dev_detect_ldd.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." + 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 information about the server." + echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)" + 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_generic_no_update(){ case "${getopt}" in st|start) @@ -144,7 +211,6 @@ case "${getopt}" in esac } - fn_getopt_teamspeak3(){ case "${getopt}" in st|start) @@ -697,88 +763,36 @@ case "${getopt}" in esac } -fn_getopt_renderware(){ -case "${getopt}" in - st|start) - command_start.sh;; - sp|stop) - command_stop.sh;; - r|restart) - command_restart.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;; - pd|postdetails) - command_postdetails.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|detect-deps) - command_dev_detect_deps.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-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 information about the server." - echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)" - 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 -} - -if [ "${gamename}" == "Mumble" ]; then - fn_getopt_mumble -elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty 4" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then - fn_getopt_generic_no_update +# Don't Starve Together +if [ "${gamename}" == "Don't Starve Together" ]; then + fn_getopt_dstserver +# Garry's Mod +elif [ "${gamename}" == "Garry's Mod" ]; then + fn_getopt_gmodserver +# Minecraft elif [ "${engine}" == "lwjgl2" ]; then fn_getopt_minecraft +# Mumble +elif [ "${gamename}" == "Mumble" ]; then + fn_getopt_mumble +# Teamspeak 3 elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_getopt_teamspeak3 -elif [ "${gamename}" == "Don't Starve Together" ]; then - fn_getopt_dstserver -elif [ "${gamename}" == "Garry's Mod" ]; then - fn_getopt_gmodserver +# Unreal 2 Engine elif [ "${engine}" == "unreal2" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then fn_getopt_ut2k4 else fn_getopt_unreal2 fi +# Unreal Engine elif [ "${engine}" == "unreal" ]; then fn_getopt_unreal -elif [ "${engine}" == "RenderWare" ]; then - fn_getopt_renderware +# Generic +elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty 4" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "Multi Theft Auto" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then + fn_getopt_generic_no_update +elif [ "${gamename}" == "Factorio" ]; then + fn_getopt_generic_update_no_steam else fn_getopt_generic fi diff --git a/lgsm/functions/fix_glibc.sh b/lgsm/functions/fix_glibc.sh index bd793d72a..8580e3e71 100644 --- a/lgsm/functions/fix_glibc.sh +++ b/lgsm/functions/fix_glibc.sh @@ -8,6 +8,9 @@ local commandname="FIX" local commandaction="Fix" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" +## i386 + +# libstdc++.so.6 local libstdc_servers_array=( "ARMA 3" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" "Just Cause 2" ) for libstdc_server in "${libstdc_servers_array[@]}" do @@ -16,6 +19,7 @@ do fi done +# libm.so.6 local libm_servers_array=( "Black Mesa: Deathmatch" "Codename CURE" "Day of Infamy" "Double Action: Boogaloo" "Empires Mod" "Fistful of Frags" "Garry's Mod" "GoldenEye: Source" "Insurgency" "Natural Selection 2" "NS2: Combat" "No More Room in Hell" ) for libm_server in "${libm_servers_array[@]}" do @@ -24,6 +28,7 @@ do fi done +# libc.so.6 local libc_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" "GoldenEye: Source" ) for libc_server in "${libc_servers_array[@]}" do @@ -32,6 +37,7 @@ do fi done +# libpthread.so.0 local libpthread_servers_array=( "Black Mesa: Deathmatch" "Blade Symphony" "Garry's Mod" ) for libpthread_server in "${libpthread_servers_array[@]}" do @@ -40,12 +46,24 @@ do fi done -if [ "${gamename}" == "Call of Duty: United Offensive" ]; then - fn_fetch_file_github "lgsm/lib/gcc3" "libgcc_s.so.1" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" - fn_fetch_file_github "lgsm/lib/gcc3" "libstdc++.so.5.0.3" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" - if [ ! -f "${lgsmdir}/lib/libstdc++.so.5" ]; then - ln -s "${lgsmdir}/lib/libstdc++.so.5.0.3" "${lgsmdir}/lib/libstdc++.so.5" +export LD_LIBRARY_PATH=:"${libdir}" + +## amd64 + +# libm.so.6 +local libm_servers_array=( "Factorio" ) +for libm_server in "${libm_servers_array[@]}" +do + if [ "${gamename}" == "${libm_server}" ]; then + fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libm.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" fi -fi +done -export LD_LIBRARY_PATH=:"${libdir}" +# libc.so.6 +local libc_servers_array=( "Factorio" ) +for libc_server in "${libc_servers_array[@]}" +do + if [ "${gamename}" == "${libc_server}" ]; then + fn_fetch_file_github "lgsm/lib/ubuntu12.04/amd64" "libc.so.6" "${lgsmdir}/lib" "noexecutecmd" "norun" "noforce" "nomd5" + fi +done \ No newline at end of file diff --git a/lgsm/functions/gsquery.py b/lgsm/functions/gsquery.py index 512d7411b..6172d53b4 100644 --- a/lgsm/functions/gsquery.py +++ b/lgsm/functions/gsquery.py @@ -29,7 +29,7 @@ class GameServer: elif self.option.engine == 'iw2.0': self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' elif self.option.engine == 'iw3.0': - self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' + self.query_prompt_string = b'\xff\xff\xff\xffgetstatus' elif self.option.engine == 'quake': self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00' elif self.option.engine == 'quakelive': diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a5fbf1a40..e092c127b 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -39,6 +39,16 @@ fn_info_config_avalanche(){ fi } +fn_info_config_ark(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + else + servername=$(grep "SessionName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/SessionName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + # Not Set + servername=${servername:-"NOT SET"} + fi +} + fn_info_config_bf1942(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -166,6 +176,23 @@ fn_info_config_dontstarve(){ fi } +fn_info_config_factorio(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="Factorio Server" + serverpassword="${unavailable}" + maxplayers="${zero}" + else + servername="Factorio Server" + serverpassword=$(grep "game_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + maxplayers=$(grep "\"max_players\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + + # Not Set + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers=:-"0"} + rconpassword=${rconpassword=:-"NOT SET"} + fi +} + fn_info_config_minecraft(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -611,6 +638,9 @@ fn_info_config_mta(){ # Just Cause 2 if [ "${engine}" == "avalanche" ]; then fn_info_config_avalanche +# ARK: Survival Evolved +elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then + fn_info_config_ark # Battlefield: 1942 elif [ "${gamename}" == "Battlefield: 1942" ]; then fn_info_config_bf1942 @@ -629,6 +659,9 @@ elif [ "${gamename}" == "Call of Duty: World at War" ]; then # Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then fn_info_config_dontstarve +# Factorio +elif [ "${gamename}" == "Factorio" ]; then + fn_info_config_factorio # Quake 2 elif [ "${gamename}" == "Quake 2" ]; then fn_info_config_quake2 diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index d9529995b..677ec4432 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -38,6 +38,9 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then elif [ "${gamename}" == "Empires Mod" ]; then glibcrequired="2.15" glibcfix="yes" +elif [ "${gamename}" == "Factorio" ]; then + glibcrequired="2.15" + glibcfix="yes" elif [ "${gamename}" == "Fistful of Frags" ]; then glibcrequired="2.15" glibcfix="yes" diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 724d88aab..e8501eaa6 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -8,35 +8,7 @@ local commandname="INSTALL" local commandaction="Install" local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -fn_fetch_default_config(){ - mkdir -pv "${lgsmdir}/default-configs" - githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" - - for config in "${array_configs[@]}" - do - fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/default-configs"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" - fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" - done -} - -# Changes some variables within the default configs -# SERVERNAME to LinuxGSM -# PASSWORD to random password -fn_set_config_vars(){ - random=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 8 | tr -d '\n'; echo) - servername="LinuxGSM" - rconpass="admin$random" - echo "changing hostname." - fn_script_log_info "changing hostname." - sleep 1 - sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" - echo "changing rcon/admin password." - fn_script_log_info "changing rcon/admin password." - sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" - sleep 1 -} - -# Checks if cfg dir exists, creates it if it doesn't +# Checks if server cfg dir exists, creates it if it doesn't fn_check_cfgdir(){ if [ ! -d "${servercfgdir}" ]; then echo "creating ${servercfgdir} config directory." @@ -45,11 +17,19 @@ fn_check_cfgdir(){ fi } -# Copys the default configs from Game-Server-Configs repo to the -# correct location +# Downloads default configs from Game-Server-Configs repo to lgsm/default-configs +fn_fetch_default_config(){ + mkdir -pv "${lgsmdir}/default-configs" + githuburl="https://github.com/GameServerManagers/Game-Server-Configs/master" + for config in "${array_configs[@]}"; do + fileurl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/${gamedirname}/${config}"; filedir="${lgsmdir}/default-configs"; filename="${config}"; executecmd="noexecute" run="norun"; force="noforce" + fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" + done +} + +# Copys default configs from Game-Server-Configs repo to server config location fn_default_config_remote(){ - for config in "${array_configs[@]}" - do + for config in "${array_configs[@]}"; do # every config is copied echo "copying ${config} config file." fn_script_log_info "copying ${servercfg} config file." @@ -66,6 +46,29 @@ fn_default_config_remote(){ sleep 1 } +# Changes some variables within the default configs +# SERVERNAME to LinuxGSM +# PASSWORD to random password +fn_set_config_vars(){ + if [ -f "${servercfgfullpath}" ]; then + random=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 8 | tr -d '\n'; echo) + servername="LinuxGSM" + rconpass="admin$random" + echo "changing hostname." + fn_script_log_info "changing hostname." + sleep 1 + sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" + echo "changing rcon/admin password." + fn_script_log_info "changing rcon/admin password." + sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" + sleep 1 + else + fn_script_log_warn "Config file not found, cannot alter it." + echo "Config file not found, cannot alter it." + sleep 1 + fi +} + # Changes some variables within the default Don't Starve Together configs fn_set_dst_config_vars(){ ## cluster.ini @@ -127,8 +130,9 @@ if [ "${gamename}" == "7 Days To Die" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars -elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then +elif [ "${gamename}" == "ARK: Survival Evolved" ]; then gamedirname="ARKSurvivalEvolved" + fn_check_cfgdir array_configs+=( GameUserSettings.ini ) fn_fetch_default_config fn_default_config_remote @@ -261,6 +265,12 @@ elif [ "${gamename}" == "Double Action: Boogaloo" ]; then fn_fetch_default_config fn_default_config_remote fn_set_config_vars +elif [ "${gamename}" == "Factorio" ]; then + gamedirname="Factorio" + array_configs+=( server-settings.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${gamename}" == "Fistful of Frags" ]; then gamedirname="FistfulofFrags" array_configs+=( server.cfg ) diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh new file mode 100644 index 000000000..353d57c20 --- /dev/null +++ b/lgsm/functions/install_factorio_save.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# LGSM install_factorio_save.sh function +# Author: Kristian Polso +# Website: https://gameservermanagers.com +# Description: Creates the initial save file for Factorio + +local commandname="INSTALL" +local commandaction="Install" + +echo "" +echo "Creating initial Factorio savefile" +echo "=================================" +sleep 1 +check_glibc.sh +"${executabledir}"/factorio --create ${filesdir}/save1 diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index d25b1e451..fff0e923d 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -34,7 +34,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament 99" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd" elif [ "${gamename}" == "Unreal Tournament" ]; then - fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" + fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3193528-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3193528-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="e3dd5853c4eb193674d5c832f60040d8" elif [ "${gamename}" == "Unreal Tournament 3" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6" elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then @@ -127,11 +127,17 @@ fi if [ "${gamename}" == "TeamSpeak 3" ]; then update_ts3.sh elif [ "${gamename}" == "Minecraft" ]; then - update_minecraft.sh install_minecraft_eula.sh + update_minecraft.sh elif [ "${gamename}" == "Mumble" ]; then update_mumble.sh +elif [ "${gamename}" == "Factorio" ]; then + update_factorio.sh + install_factorio_save.sh elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then + if [ "${gamename}" == "Unreal Tournament" ]; then + install_unreal_tournament_eula.sh + fi fn_install_server_files fi diff --git a/lgsm/functions/install_unreal_tournament_eula.sh b/lgsm/functions/install_unreal_tournament_eula.sh new file mode 100644 index 000000000..b39f9b2e2 --- /dev/null +++ b/lgsm/functions/install_unreal_tournament_eula.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# LGSM install_unreal_tournament_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://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-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" \ No newline at end of file diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh new file mode 100644 index 000000000..c3e16d802 --- /dev/null +++ b/lgsm/functions/update_factorio.sh @@ -0,0 +1,167 @@ +#!/bin/bash +# LGSM update_factorio.sh function +# Author: Daniel Gibbs +# Contributor: Kristian Polso +# Website: https://gameservermanagers.com +# Description: Handles updating of Factorio servers. + +local commandname="UPDATE" +local commandaction="Update" +local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" + +fn_update_factorio_dl(){ + fn_fetch_file "https://www.factorio.com/get-download/${availablebuild}/headless/${factorioarch}" "${tmpdir}" "factorio_headless_${factorioarch}-${availablebuild}.tar.gz" + fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${availablebuild}.tar.gz" "${tmpdir}" + echo -e "copying to ${filesdir}...\c" + fn_script_log "Copying to ${filesdir}" + cp -R "${tmpdir}/factorio/"* "${filesdir}" + local exitcode=$? + if [ "${exitcode}" == "0" ]; then + fn_print_ok_eol_nl + else + fn_print_fail_eol_nl + fi +} + +fn_update_factorio_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: factorio.com" + sleep 1 + fn_print_error_nl "Checking for update: factorio.com: No logs with server version found" + fn_script_log_error "Checking for update: factorio.com: No logs with server version found" + sleep 1 + fn_print_info_nl "Checking for update: factorio.com: Forcing server restart" + fn_script_log_info "Checking for update: factorio.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: factorio.com: Still No logs with server version found" + fn_script_log_fatal "Checking for update: factorio.com: Still No logs with server version found" + core_exit.sh + fi + fi + + # Get current build from logs + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + if [ -z "${currentbuild}" ]; then + fn_print_error_nl "Checking for update: factorio.com: Current build version not found" + fn_script_log_error "Checking for update: factorio.com: Current build version not found" + sleep 1 + fn_print_info_nl "Checking for update: factorio.com: Forcing server restart" + fn_script_log_info "Checking for update: factorio.com: Forcing server restart" + exitbypass=1 + command_stop.sh + exitbypass=1 + command_start.sh + currentbuild=$(grep "Loading mod base" "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null|awk '{print $5}') + if [ -z "${currentbuild}" ]; then + fn_print_fail_nl "Checking for update: factorio.com: Current build version still not found" + fn_script_log_fatal "Checking for update: factorio.com: Current build version still not found" + core_exit.sh + fi + fi +} + +fn_update_factorio_arch(){ + # Factorio is linux64 only for now + factorioarch="linux64" +} + +fn_update_factorio_availablebuild(){ + # Gets latest build info. + availablebuild=$(curl -s https://www.factorio.com/download-headless/stable | grep 'headless/linux64' | head -n 1 | grep -oP '(?<=get-download/).*?(?=/)') + sleep 1 + + # Checks if availablebuild variable has been set + if [ -z "${availablebuild}" ]; then + fn_print_fail "Checking for update: factorio.com" + sleep 1 + fn_print_fail "Checking for update: factorio.com: Not returning version info" + fn_script_log_fatal "Failure! Checking for update: factorio.com: Not returning version info" + core_exit.sh + elif [ "${installer}" == "1" ]; then + : + else + fn_print_ok "Checking for update: factorio.com" + fn_script_log_pass "Checking for update: factorio.com" + sleep 1 + fi +} + +fn_update_factorio_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} ${factorioarch}${default}" + echo -e " Available build: ${green}${availablebuild} ${factorioarch}${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_factorio_dl + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + else + exitbypass=1 + command_stop.sh + fn_update_factorio_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 +} + + +fn_update_factorio_arch +if [ "${installer}" == "1" ]; then + fn_update_factorio_availablebuild + fn_update_factorio_dl +else + # Checks for server update from factorio.com + fn_print_dots "Checking for update: factorio.com" + fn_script_log_info "Checking for update: factorio.com" + sleep 1 + fn_update_factorio_currentbuild + fn_update_factorio_availablebuild + fn_update_factorio_compare +fi diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh index 717e798cd..746ddfb2e 100644 --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -79,6 +79,8 @@ fn_update_availablebuild(){ 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 + elif [ "${installer}" == "1" ]; then + : else fn_print_ok_nl "Checking for update: mojang.com" fn_script_log_pass "Checking for update: mojang.com" diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 338ad4545..6f5c35a88 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -86,6 +86,8 @@ fn_update_mumble_availablebuild(){ fn_print_fail "Checking for update: GitHub: Not returning version info" fn_script_log_fatal "Failure! Checking for update: GitHub: Not returning version info" core_exit.sh + elif [ "${installer}" == "1" ]; then + : else fn_print_ok "Checking for update: GitHub" fn_script_log_pass "Checking for update: GitHub" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index 5e897f7b9..b5f403597 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -15,7 +15,7 @@ fn_update_ts3_dl(){ fn_script_log "Copying to ${filesdir}" cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${filesdir}" local exitcode=$? - if [ ${exitcode} -eq 0 ]; then + if [ "${exitcode}" == "0" ]; then fn_print_ok_eol_nl else fn_print_fail_eol_nl @@ -23,8 +23,8 @@ fn_update_ts3_dl(){ } fn_update_ts3_currentbuild(){ - # Gets currentbuild info - # Checks currentbuild info is available, if fails a server restart will be forced to generate logs. + # 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 [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then fn_print_error "Checking for update: teamspeak.com" sleep 1 @@ -113,6 +113,8 @@ fn_update_ts3_availablebuild(){ fn_print_fail "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 + elif [ "${installer}" == "1" ]; then + : else fn_print_ok "Checking for update: teamspeak.com" fn_script_log_pass "Checking for update: teamspeak.com" diff --git a/lgsm/lib/gcc3/libgcc_s.so.1 b/lgsm/lib/gcc3/libgcc_s.so.1 deleted file mode 100644 index acb442512..000000000 Binary files a/lgsm/lib/gcc3/libgcc_s.so.1 and /dev/null differ diff --git a/lgsm/lib/gcc3/libstdc++.so.5.0.3 b/lgsm/lib/gcc3/libstdc++.so.5.0.3 deleted file mode 100755 index 65db75723..000000000 Binary files a/lgsm/lib/gcc3/libstdc++.so.5.0.3 and /dev/null differ diff --git a/lgsm/lib/ubuntu12.04/amd64/libc.so.6 b/lgsm/lib/ubuntu12.04/amd64/libc.so.6 new file mode 100644 index 000000000..c83c7057c Binary files /dev/null and b/lgsm/lib/ubuntu12.04/amd64/libc.so.6 differ diff --git a/lgsm/lib/ubuntu12.04/amd64/libm.so.6 b/lgsm/lib/ubuntu12.04/amd64/libm.so.6 new file mode 100644 index 000000000..3ec2d3420 Binary files /dev/null and b/lgsm/lib/ubuntu12.04/amd64/libm.so.6 differ diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 4f07338e8..c9140e9d0 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -2,7 +2,7 @@ # Just Cause 2 # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs -# License: MIT License, Copyright (c) 2016 Daniel Gibbs +# License: MIT License, Copyright (c) 2017 Daniel Gibbs # Purpose: TravisCI Test: Just Cause 2 | Server Management Script # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors # Documentation: https://github.com/GameServerManagers/LinuxGSM/wiki @@ -17,7 +17,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="161224" +version="170110" ########################## ######## Settings ######## @@ -27,7 +27,6 @@ version="161224" # No settings available for Just Cause 2 ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters -# Edit with care fn_parms(){ parms="" } diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 82a4cc147..21c76309c 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -29,6 +29,7 @@ pushbullettoken="accesstoken" # Start Variables updateonstart="off" + fn_parms(){ parms="" }