Browse Source

Added unity3d engine details

pull/254/merge
Daniel Gibbs 10 years ago
parent
commit
783e2a83bc
  1. 42
      functions/fn_details

42
functions/fn_details

@ -184,6 +184,46 @@ fi
echo ""
}
fn_unity3ddetails(){
fn_autoip
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
servername=$(grep ServerName "${servercfgfullpath}"|sed 's/^.*value="//'|cut -f1 -d"\"")
port=$(grep ServerPort "${servercfgfullpath}"|tr -cd [:digit:])
webadminport=$(grep ControlPanelPort "${servercfgfullpath}"|tr -cd [:digit:])
telnetport=$(grep TelnetPort "${servercfgfullpath}"|tr -cd [:digit:])
webadminuser=$(grep ControlPanelPassword "${servercfgfullpath}"|sed 's/^.*value="//'|cut -f1 -d"\"")
echo ""
echo "${gamename} Server Details"
echo "============================"
echo "Server name: ${servername}"
echo "Server IP: ${ip}:${port}"
echo "Config file: ${servercfgfullpath}"
echo ""
echo "Server Ports"
echo "============================"
echo "Ports the server is currently using."
echo ""
echo "DIRECTION DESCRIPTION PORT"
echo "INBOUND Game port ${port}"
echo "INBOUND WebAdmin ${webadminport}"
echo "INBOUND Telnet ${telnetport}"
echo ""
echo "${servername} WebAdmin"
echo "======================="
echo "WebAdmin URL: http://${ip}:${webadminport}"
echo "WebAdmin Username: ${webadminuser}"
echo ""
echo "You can change ports by editing the"
echo "parameters in ${servercfgfullpath}"
echo ""
if [ "${pid}" == "0" ]; then
echo -e "Status:\e[0;31m OFFLINE\e[0;39m"
else
echo -e "Status:\e[0;32m ONLINE\e[0;39m"
fi
echo ""
}
fn_unrealdetails(){
fn_autoip
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
@ -256,6 +296,8 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
fn_sourcedetails
elif [ "${engine}" == "spark" ]; then
fn_sparkdetails
elif [ "${engine}" == "unity3d" ]; then
fn_unity3ddetails
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
fn_unrealdetails
else

Loading…
Cancel
Save