From 0314e54ea7be09324cbdcf992278dfe5da240689 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 25 Aug 2016 10:42:39 +0100 Subject: [PATCH 1/6] Added Teeworlds glibc requirements --- lgsm/functions/info_glibc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index a1916944f..dea585ce9 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -41,6 +41,9 @@ elif [ "${gamename}" == "Quake Live" ]; then elif [ "${gamename}" == "TeamSpeak 3" ]; then glibcrequired="NOT REQUIRED" glibcfix="no" +elif [ "${gamename}" == "Teeworlds" ]; then + glibcrequired="2.3" + glibcfix="no" elif [ "${engine}" == "avalanche" ]; then glibcrequired="2.13" glibcfix="yes" From db61900b94939fe58cbc1d0362516d2e0d757674 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Fri, 26 Aug 2016 03:04:55 +0200 Subject: [PATCH 2/6] && for glibc instead of || Logic function here http://imgur.com/a/hKKp9 --- lgsm/functions/check_deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 1939937ec..7c5cb0d50 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -150,7 +150,7 @@ if [ -n "$(command -v dpkg-query)" ]; then fi # All servers except ts3,mumble and minecraft servers require libstdc++6 and lib32gcc1 - if [ "${gamename}" != "TeamSpeak 3" ]||[ "${gamename}" != "Mumble" ]||[ "${engine}" != "lwjgl2" ]; then + if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${engine}" != "lwjgl2" ]; then if [ "${arch}" == "x86_64" ]; then array_deps_required+=( lib32gcc1 libstdc++6:i386 ) else @@ -219,7 +219,7 @@ elif [ -n "$(command -v yum)" ]; then fi # All servers except ts3,mumble and minecraft servers require glibc.i686 and libstdc++.i686 - if [ "${gamename}" != "TeamSpeak 3" ]||[ "${gamename}" != "Mumble" ]||[ "${engine}" != "lwjgl2" ]; then + if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${gamename}" != "Mumble" ]&&[ "${engine}" != "lwjgl2" ]; then array_deps_required+=( glibc.i686 libstdc++.i686 ) fi From 7f88bc874223ea32416c239f987e707865501117 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Fri, 26 Aug 2016 14:52:59 +0200 Subject: [PATCH 3/6] funcownissue instead of filesownissue It wouldn't display onwership issues in filesdir. --- lgsm/functions/check_permissions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 297bf16d6..32e8d84e3 100644 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -37,7 +37,7 @@ fn_check_ownership(){ if [ "${funcownissue}" == "1" ]; then find "${functionsdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" fi - if [ "${funcownissue}" == "1" ]; then + if [ "${filesownissue}" == "1" ]; then find "${filesdir}" -not -user $(whoami) -printf "%u\t\t%g\t%p\n" fi From 8bc71ca9b8bcae73fb82e04d594270bf3f6d2eb0 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Fri, 26 Aug 2016 15:14:06 +0200 Subject: [PATCH 4/6] Updated 404 shunit link Thanks to Cedar --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a1c63dcf..f91811da3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ env: - DISTRO=ubuntu-trusty before_script: - - curl -L "https://shunit2.googlecode.com/files/shunit2-2.1.6.tgz" | tar zx + - curl -L "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/shunit2/shunit2-2.1.6.tgz" | tar zx addons: apt: @@ -23,4 +23,4 @@ addons: script: - bash tests/tests_jc2server.sh - - bash tests/tests_ts3server.sh \ No newline at end of file + - bash tests/tests_ts3server.sh From d42d029f8793e918fc8e46c2f059bbb1399997f6 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Fri, 26 Aug 2016 23:51:25 +0200 Subject: [PATCH 5/6] Minecraft earns the right to have a servername too Gladly solves #1030 @marvinl97 You manipulate sed like nobody else ;) @JimTR Thanks for the help @Sebi94nbg Thanks for reporting --- lgsm/functions/info_config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 6c868d047..571e02f5e 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -70,6 +70,7 @@ fn_info_config_dontstarve(){ fn_info_config_minecraft(){ if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" rconpassword="${unavailable}" rconport="${zero}" slots="${zero}" @@ -82,6 +83,7 @@ fn_info_config_minecraft(){ if [ -n "${ipconfigcheck}" ]; then ip="${ipconfigcheck}" fi + servername=$(grep "motd=" "${servercfgfullpath}" | sed 's/motd=//g' | tr -d '=\";' | sed 's/\\n.*//g') rconpassword=$(grep "rcon.password=" "${servercfgfullpath}" | sed 's/rcon.password=//g' | tr -d '=\"; ') rconport=$(grep "rcon.port=" "${servercfgfullpath}" | tr -cd '[:digit:]') slots=$(grep "max-players=" "${servercfgfullpath}" | tr -cd '[:digit:]') @@ -90,6 +92,7 @@ fn_info_config_minecraft(){ gameworld=$(grep "level-name=" "${servercfgfullpath}" | sed 's/level-name=//g' | tr -d '=\"; ') # Not Set + servername=${servername:-"NOT SET"} rconpassword=${rconpassword:-"NOT SET"} rconport=${rconport:-"NOT SET"} slots=${slots:-"NOT SET"} From 18104545a018caf9789f3fea019a9825473c6dbe Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sat, 27 Aug 2016 16:42:55 +0200 Subject: [PATCH 6/6] Fixes removed spaces for Arma servername #1033 Feel the power of awk over sed ! Fixes #1033 --- lgsm/functions/info_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 571e02f5e..c6cbddace 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -152,7 +152,7 @@ fn_info_config_realvirtuality(){ serverpassword="${unavailable}" slots="${zero}" else - servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | sed 's/\//g' | tr -d '=\"; ') + servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | awk -F '"' '{print $2}') adminpassword=$(grep "passwordAdmin" "${servercfgfullpath}" | grep -v "//" | sed 's/\passwordAdmin//g' | tr -d '=\"; ') serverpassword=$(grep "password =" "${servercfgfullpath}" | grep -v "//" | sed 's/\password//g' | tr -d '=\"; ') slots=$(grep "maxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')