|
@@ -2,7 +2,7 @@
|
|
|
# LGSM fn_monitor_query function
|
|
# LGSM fn_monitor_query function
|
|
|
# Author: Daniel Gibbs
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://gameservermanagers.com
|
|
# Website: http://gameservermanagers.com
|
|
|
-# Version: 030715
|
|
|
|
|
|
|
+# Version: 311015
|
|
|
|
|
|
|
|
# Description: uses gsquery.py to directly query the server.
|
|
# Description: uses gsquery.py to directly query the server.
|
|
|
# Detects if the server has frozen.
|
|
# Detects if the server has frozen.
|
|
@@ -10,15 +10,15 @@
|
|
|
local modulename="Monitor"
|
|
local modulename="Monitor"
|
|
|
if [ -f "${rootdir}/gsquery.py" ]; then
|
|
if [ -f "${rootdir}/gsquery.py" ]; then
|
|
|
if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
|
|
if [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
|
|
|
- gameport=$(grep Port= "${servercfgfullpath}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|tr -d '\r'|tr -cd [:digit:])
|
|
|
|
|
|
|
+ gameport=$(grep Port= "${servercfgfullpath}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|tr -d '\r'|tr -cd '[:digit:]')
|
|
|
port=$((${gameport} + 1))
|
|
port=$((${gameport} + 1))
|
|
|
elif [ "${engine}" == "spark" ]; then
|
|
elif [ "${engine}" == "spark" ]; then
|
|
|
port=$((${port} + 1))
|
|
port=$((${port} + 1))
|
|
|
elif [ "${engine}" == "realvirtuality" ]; then
|
|
elif [ "${engine}" == "realvirtuality" ]; then
|
|
|
- queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd [:digit:])
|
|
|
|
|
|
|
+ queryport=$(grep -s steamqueryport= "${servercfgfullpath}"|grep -v //|tr -d '\r'|tr -cd '[:digit:]')
|
|
|
port=${queryport}
|
|
port=${queryport}
|
|
|
elif [ "${engine}" == "unity3d" ]; then
|
|
elif [ "${engine}" == "unity3d" ]; then
|
|
|
- gameport=$(grep ServerPort "${servercfgfullpath}"|tr -cd [:digit:])
|
|
|
|
|
|
|
+ gameport=$(grep ServerPort "${servercfgfullpath}"|tr -cd '[:digit:]')
|
|
|
port=$((${gameport} + 1))
|
|
port=$((${gameport} + 1))
|
|
|
fi
|
|
fi
|
|
|
fn_printinfo "Detected gsquery.py"
|
|
fn_printinfo "Detected gsquery.py"
|