Просмотр исходного кода

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

Daniel Gibbs 10 лет назад
Родитель
Сommit
fed375b9c1

+ 2 - 2
.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
+    - bash tests/tests_ts3server.sh

+ 2 - 2
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
 

+ 1 - 1
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
 

+ 4 - 1
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"}
@@ -149,7 +152,7 @@ fn_info_config_realvirtuality(){
 		serverpassword="${unavailable}"
 		slots="${zero}"
 	else
-		servername=$(grep "hostname" "${servercfgfullpath}" | grep -v "//" | sed 's/\<hostname\>//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:]')

+ 3 - 0
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"