فهرست منبع

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

Daniel Gibbs 10 سال پیش
والد
کامیت
13e965daa9
56فایلهای تغییر یافته به همراه106 افزوده شده و 75 حذف شده
  1. 1 1
      7DaysToDie/sdtdserver
  2. 1 1
      Arma3/arma3server
  3. 1 1
      BlackMesa/bmdmserver
  4. 1 1
      BladeSymphony/bsserver
  5. 1 1
      BrainBread2/bb2server
  6. 1 1
      CodenameCURE/ccserver
  7. 1 1
      CounterStrike/csserver
  8. 1 1
      CounterStrikeConditionZero/csczserver
  9. 1 1
      CounterStrikeGlobalOffensive/csgoserver
  10. 1 1
      CounterStrikeSource/cssserver
  11. 1 1
      DayOfDefeat/dodserver
  12. 1 1
      DayOfDefeatSource/dodsserver
  13. 1 1
      DeathmatchClassic/dmcserver
  14. 1 1
      DontStarveTogether/dstserver
  15. 1 1
      DoubleActionBoogaloo/dabserver
  16. 1 1
      FistfulOfFrags/fofserver
  17. 1 1
      GarrysMod/gmodserver
  18. 1 1
      GoldenEyeSource/gesserver
  19. 1 1
      HalfLife2Deathmatch/hl2dmserver
  20. 1 1
      HalfLifeDeathmatch/hldmserver
  21. 1 1
      HalfLifeDeathmatchSource/hldmsserver
  22. 1 1
      Hurtworld/hwserver
  23. 2 2
      Insurgency/insserver
  24. 1 1
      JustCause2/jc2server
  25. 1 1
      KillingFloor/kfserver
  26. 1 1
      Left4Dead/l4dserver
  27. 1 1
      Left4Dead2/l4d2server
  28. 1 1
      Mumble/mumbleserver
  29. 1 1
      NS2Combat/ns2cserver
  30. 1 1
      NaturalSelection2/ns2server
  31. 1 1
      NoMoreRoomInHell/nmrihserver
  32. 1 1
      OpposingForce/opforserver
  33. 1 1
      PiratesVikingandKnightsII/pvkiiserver
  34. 1 1
      ProjectZomboid/pzserver
  35. 1 1
      QuakeLive/qlserver
  36. 1 1
      RedOrchestra/roserver
  37. 1 1
      Ricochet/ricochetserver
  38. 1 1
      Rust/rustserver
  39. 1 1
      SeriousSam3BFE/ss3sserver
  40. 1 1
      StarBound/sbserver
  41. 1 1
      SvenCoop/svencoopserver
  42. 1 1
      TeamFortress2/tf2server
  43. 1 1
      TeamFortressClassic/tfcserver
  44. 1 1
      TeamSpeak3/ts3server
  45. 1 1
      Teeworlds/twserver
  46. 1 1
      Terraria/terrariaserver
  47. 1 1
      UnrealTournament2004/ut2k4server
  48. 1 1
      UnrealTournament99/ut99server
  49. 10 1
      functions/core_functions.sh
  50. 15 0
      functions/update_functions.sh
  51. 5 5
      lgsm/functions/alert.sh
  52. 1 1
      lgsm/functions/command_monitor.sh
  53. 19 12
      lgsm/functions/command_stop.sh
  54. 1 1
      lgsm/functions/install_gsquery.sh
  55. 2 2
      lgsm/functions/logs.sh
  56. 4 4
      lgsm/functions/monitor_gsquery.sh

+ 1 - 1
7DaysToDie/sdtdserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Arma3/arma3server

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
BlackMesa/bmdmserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
BladeSymphony/bsserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
BrainBread2/bb2server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
CodenameCURE/ccserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
CounterStrike/csserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
CounterStrikeConditionZero/csczserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
CounterStrikeGlobalOffensive/csgoserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
CounterStrikeSource/cssserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
DayOfDefeat/dodserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
DayOfDefeatSource/dodsserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
DeathmatchClassic/dmcserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
DontStarveTogether/dstserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
DoubleActionBoogaloo/dabserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
FistfulOfFrags/fofserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
GarrysMod/gmodserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
GoldenEyeSource/gesserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
HalfLife2Deathmatch/hl2dmserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
HalfLifeDeathmatch/hldmserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
HalfLifeDeathmatchSource/hldmsserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Hurtworld/hwserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 2 - 2
Insurgency/insserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login
@@ -71,7 +71,7 @@ functionsdir="${lgsmdir}/functions"
 filesdir="${rootdir}/serverfiles"
 systemdir="${filesdir}/insurgency"
 executabledir="${filesdir}"
-executable="./srcds_linux"
+executable="./srcds_run"
 servercfg="${servicename}.cfg"
 servercfgdir="${systemdir}/cfg"
 servercfgfullpath="${servercfgdir}/${servercfg}"

+ 1 - 1
JustCause2/jc2server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
KillingFloor/kfserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Left4Dead/l4dserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Left4Dead2/l4d2server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Pushover

+ 1 - 1
Mumble/mumbleserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Server Details

+ 1 - 1
NS2Combat/ns2cserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
NaturalSelection2/ns2server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
NoMoreRoomInHell/nmrihserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
OpposingForce/opforserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
PiratesVikingandKnightsII/pvkiiserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
ProjectZomboid/pzserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
QuakeLive/qlserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
RedOrchestra/roserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Ricochet/ricochetserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Rust/rustserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login (not required)

+ 1 - 1
SeriousSam3BFE/ss3sserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
StarBound/sbserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
SvenCoop/svencoopserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
TeamFortress2/tf2server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
TeamFortressClassic/tfcserver

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
TeamSpeak3/ts3server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Start Variables

+ 1 - 1
Teeworlds/twserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
Terraria/terrariaserver

@@ -23,7 +23,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Steam login

+ 1 - 1
UnrealTournament2004/ut2k4server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Start Variables

+ 1 - 1
UnrealTournament99/ut99server

@@ -22,7 +22,7 @@ email="email@example.com"
 
 # Pushbullet 
 # https://www.pushbullet.com/#settings
-pushbulletalert"off"
+pushbulletalert="off"
 pushbullettoken="accesstoken"
 
 # Start Variables

+ 10 - 1
functions/core_functions.sh

@@ -14,6 +14,15 @@ if [ -z "${lgsmdir}" ]; then
 fi 
 
 fn_fetch_core_dl(){
+if [ -z "${githubuser}" ]; then
+	githubuser="dgibbs64"
+fi
+if [ -z "${githubrepo}" ]; then	
+	githubrepo="linuxgsm"
+fi
+if [ -z "${githubbranch}" ]; then
+	githubbranch="master"
+fi
 github_file_url_dir="lgsm/functions"
 github_file_url_name="${functionfile}"
 filedir="${functionsdir}"
@@ -60,4 +69,4 @@ functionfile="${FUNCNAME}"
 fn_fetch_core_dl
 }
 
-core_functions.sh
+core_functions.sh

+ 15 - 0
functions/update_functions.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+# LGSM fn_update_functions function
+# Author: Daniel Gibbs
+# Website: https://gameservermanagers.com
+lgsm_version="210516"
+
+# Description: REDIRECT FUNCTION to new command_update_functions.sh
+
+command_update_functions.sh(){
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
+command_update_functions.sh
+

+ 5 - 5
lgsm/functions/alert.sh

@@ -8,7 +8,7 @@ lgsm_version="210516"
 
 fn_alert_test(){
 	fn_scriptlog "Sending test alert"
-	alertsubject="LGSM - Alert Check - ${servername}"
+	alertsubject="LGSM - Test Alert - ${servername}"
 	alertbody="LGSM test alert, how you read?"
 }
 
@@ -21,13 +21,13 @@ fn_alert_restart(){
 fn_alert_restart_query(){
 	fn_scriptlog "Sending restart alert: ${gsquerycmd}"
 	alertsubject="LGSM - Restarted - ${servername}"
-	alertbody="Failed to Query: ${gsquerycmd}"
+	alertbody="gsquery.py failed to query: ${gsquerycmd}"
 }
 
 fn_alert_update(){
 	fn_scriptlog "Sending update alert"
 	alertsubject="LGSM - Updated - ${servername}"
-	alertbody="${servicename} Recieved update"
+	alertbody="${servicename} recieved update"
 }
 
 if [ "${alert}" == "restart" ]; then
@@ -43,7 +43,7 @@ fi
 if [ "${emailnotification}" == "on" ]||[ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then
 	alert_email.sh
 elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
-	fn_print_fail_nl "Alerts not enabled"
+	fn_print_info_nl "Email alerts not enabled"
 	fn_scriptlog "Email alerts not enabled"	
 elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_fail_nl "Email no set"
@@ -53,7 +53,7 @@ fi
 if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then
 	alert_pushbullet.sh
 elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
-	fn_print_fail_nl "Pushbullet alerts not enabled"
+	fn_print_info_nl "Pushbullet alerts not enabled"
 	fn_scriptlog "Pushbullet alerts not enabled"
 elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_fail_nl "Pushbullet token not set"

+ 1 - 1
lgsm/functions/command_monitor.sh

@@ -66,7 +66,7 @@ fn_monitor_tmux(){
 		local allowed_engines_array=( avalanche goldsource realvirtuality source spark unity3d unreal unreal2 )
 		for allowed_engine in "${allowed_engines_array[@]}"
 		do
-			if [ "${allowed_engine}" == "${function_selfname}" ]; then
+			if [ "${allowed_engine}" == "${engine}" ]; then
 				monitor_gsquery.sh
 			fi
 		done

+ 19 - 12
lgsm/functions/command_stop.sh

@@ -17,8 +17,8 @@ fn_stop_graceful_source(){
 	tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1
 	# waits up to 30 seconds giving the server time to shutdown gracefuly
 	for seconds in {1..30}; do
-		pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
-		if [ "${pid}" == "0" ]; then
+		check_status.sh
+		if [ "${status}" == "0" ]; then
 			fn_print_ok "Graceful: rcon quit: ${seconds}: "
 			fn_print_ok_eol_nl
 			fn_scriptlog "Graceful: rcon quit: OK: ${seconds} seconds"
@@ -27,7 +27,8 @@ fn_stop_graceful_source(){
 		sleep 1
 		fn_print_dots "Graceful: rcon quit: ${seconds}"
 	done
-	if [ "${pid}" != "0" ]; then
+	check_status.sh
+	if [ "${status}" != "0" ]; then
 		fn_print_fail "Graceful: rcon quit: "
 		fn_print_fail_eol_nl
 		fn_scriptlog "Graceful: rcon quit: FAIL"
@@ -202,11 +203,17 @@ fn_stop_teamspeak3(){
 	fn_scriptlog "${servername}"
 	sleep 1
 	${filesdir}/ts3server_startscript.sh stop > /dev/null 2>&1
-	# Remove lock file
-	rm -f "${rootdir}/${lockselfname}"
-	fn_print_ok_nl "${servername}"
-	fn_scriptlog "Stopped ${servername}"
-	}
+	check_status.sh
+	if [ "${status}" == "0" ]; then
+		# Remove lock file
+		rm -f "${rootdir}/${lockselfname}"
+		fn_print_ok_nl "${servername}"
+		fn_scriptlog "Stopped ${servername}"
+	else
+		fn_print_fail_nl "Unable to stop${servername}"
+		fn_scriptlog "Unable to stop${servername}"
+	fi
+}
 
 fn_stop_tmux(){
 	fn_print_dots "${servername}"
@@ -215,8 +222,8 @@ fn_stop_tmux(){
 	# Kill tmux session
 	tmux kill-session -t "${servicename}" > /dev/null 2>&1
 	sleep 0.5
-	pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
-	if [ "${pid}" == "0" ]; then
+	check_status.sh
+	if [ "${status}" == "0" ]; then
 		# Remove lock file
 		rm -f "${rootdir}/${lockselfname}"
 		# ARK doesn't clean up immediately after tmux is killed.
@@ -244,8 +251,8 @@ fn_stop_pre_check(){
 			fn_stop_teamspeak3
 		fi
 	else
-		pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
-		if [ "${pid}" == "0" ]; then
+		check_status.sh
+		if [ "${status}" == "0" ]; then
 			fn_print_ok_nl "${servername} is already stopped"
 			fn_scriptlog "${servername} is already stopped"
 		else

+ 1 - 1
lgsm/functions/install_gsquery.sh

@@ -5,7 +5,7 @@
 lgsm_version="210516"
 
 fn_dlgsquery(){
-	cd "${rootdir}"
+	cd "${functionsdir}"
 	echo -e "downloading gsquery.py...\c"
 	wget -N /dev/null "https://gameservermanagers.com/dl/gsquery.py" 2>&1 | grep -F "HTTP" | grep -v "Moved Permanently" | cut -c45- | uniq
 	chmod +x gsquery.py

+ 2 - 2
lgsm/functions/logs.sh

@@ -17,9 +17,9 @@ if [ -n "${consolelog}" ]; then
 fi
 
 # For games not displaying a console, and having logs into their game folder
-if [ -n "${gamelogfile}" ]; then
+if [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then
 	if [ -n "$(find "${systemdir}" -name "gamelog*.log")" ]; then
-		fn_printinfo "Moving game logs to ${gamelogdir}"
+		fn_print_info "Moving game logs to ${gamelogdir}"
 		fn_scriptlog "Moving game logs to ${gamelogdir}"
 		echo -en "\n"
 		sleep 1

+ 4 - 4
lgsm/functions/monitor_gsquery.sh

@@ -9,7 +9,7 @@ lgsm_version="210516"
 
 local modulename="Monitor"
 
-# Forces legecy servers to use gsquery as vat gsquery is not present in legecy
+# Forces legecy servers to use gsquery
 if [ -z "${gsquery}" ]; then
 	gsquery="yes"
 fi	 
@@ -29,7 +29,7 @@ if [ "${gsquery}" == "yes" ]; then
 		port=$((port + 1))
 	fi
 
-	if [ -z "${queryport}" ]; then
+	if [ -n "${queryport}" ]; then
 		port="${queryport}"
 	fi
 
@@ -46,14 +46,14 @@ if [ "${gsquery}" == "yes" ]; then
 		fn_print_querying_eol
 		fn_scriptlog "Querying port: ${ip}:${port} : ${queryattempt} : QUERYING"
 		
-		gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p 1 -e "${engine}" 2>&1)
+		gsquerycmd=$("${functionsdir}"/gsquery.py -a "${ip}" -p "${port}" -e "${engine}" 2>&1)
 		exitcode=$?
 
 		sleep 1
 		if [ "${exitcode}" == "0" ]; then
 			# Server OK
 			fn_print_ok "Querying port: ${ip}:${port} : ${queryattempt} : "
-			fn_print_ok_eol
+			fn_print_ok_eol_nl
 			fn_scriptlog "Querying port: ${ip}:${port} : ${queryattempt} : OK"
 			sleep 1
 			exit