瀏覽代碼

Ports now states "Server Ports"

Changed to "Server Ports" rather that "$servername Ports" as some
servers may have a very long name
Daniel Gibbs 11 年之前
父節點
當前提交
26d1f40f37
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      functions/fn_details

+ 6 - 6
functions/fn_details

@@ -22,7 +22,7 @@ echo "Start Parameters"
 echo "============================"
 echo "${executable} ${parms}"
 echo ""
-echo "${servername} Ports"
+echo "Server Ports"
 echo "============================"
 echo "Ports the server is currently using."
 echo ""
@@ -47,7 +47,7 @@ echo ""
 fn_unrealdetails(){
 fn_autoip
 pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
-gameport=$(grep Port= "${systemdir}/${ini}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g')
+gameport=$(grep Port= "${systemdir}/${ini}"|grep -v Master|grep -v LAN|grep -v Proxy|grep -v Listen|sed 's/\Port=//g'||tr -d '\r')
 queryport=$((${gameport} + 1))
 gsqueryport=$(grep OldQueryPortNumber= "${systemdir}/${ini}"|sed 's/\OldQueryPortNumber=//g')
 udplinkport=$((${gameport} + 2))
@@ -65,7 +65,7 @@ echo "Server name: ${servername}"
 echo "Server IP: ${ip}:${gameport}"
 echo "Config file: ${systemdir}/${ini}"
 echo ""
-echo "${servername} Ports"
+echo "Server Ports"
 echo "============================"
 echo "Ports the server is currently using."
 echo ""
@@ -116,7 +116,7 @@ echo "============================"
 echo "Server name: ${servername}"
 echo "Server IP: ${ip}:${port}"
 echo ""
-echo "${servername} Ports"
+echo "Server Ports"
 echo "============================"
 echo "Ports the server is currently using."
 echo ""
@@ -153,7 +153,7 @@ echo "Server name: ${servername}"
 echo "Server IP: ${ip}:${port}"
 echo "Config file: ${servercfgfullpath}"
 echo ""
-echo "${servername} Ports"
+echo "Server Ports"
 echo "============================"
 echo "Ports the server is currently using."
 echo ""
@@ -183,7 +183,7 @@ echo "Config file: ${servercfgfullpath}"
 echo ""
 echo "Admin Password: ${adminpass}"
 echo ""
-echo "${servername} Ports"
+echo "Server Ports"
 echo "============================"
 echo "Ports the server is currently using."
 echo ""