gameservergame-servergame-servershacktoberfestdedicated-game-serversgamelinuxgsmserverbashgaminglinuxmultiplayer-game-servershell
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
547 lines
18 KiB
547 lines
18 KiB
#!/bin/bash
|
|
# LGSM fn_details function
|
|
# Author: Daniel Gibbs
|
|
# Website: http://gameservermanagers.com
|
|
# Version: 060715
|
|
|
|
# Description: Displays server infomation.
|
|
|
|
# Standard Details
|
|
# This applies to all engines
|
|
|
|
fn_details_os(){
|
|
echo -e ""
|
|
echo -e "\e[93mDistro Details\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mDistro:\t\e[0m${os}" >> .fn_details_distro
|
|
echo -e "\e[34mArch:\t\e[0m${arch}" >> .fn_details_distro
|
|
echo -e "\e[34mKernel:\t\e[0m${kernel}" >> .fn_details_distro
|
|
echo -e "\e[34mHostname:\t\e[0m$HOSTNAME" >> .fn_details_distro
|
|
echo -e "\e[34mtmux:\t\e[0m${tmuxv}" >> .fn_details_distro
|
|
echo -e "\e[34mGLIBC:\t\e[0m${glibcv}" >> .fn_details_distro
|
|
column -s $'\t' -t .fn_details_distro
|
|
rm -f .fn_details_distro
|
|
}
|
|
|
|
fn_details_performance(){
|
|
echo -e ""
|
|
echo -e "\e[93mPerformance\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m" >> .fn_details_performance
|
|
echo -e "\e[34mAvg Load:\t\e[0m${load}" >> .fn_details_performance
|
|
column -s $'\t' -t .fn_details_performance
|
|
rm -f .fn_details_performance
|
|
echo -e ""
|
|
echo -e "\e[34mMem:\t\e[34mtotal\t used\t free\e[0m" >> .fn_details_performance
|
|
echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m" >> .fn_details_performance
|
|
echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m" >> .fn_details_performance
|
|
column -s $'\t' -t .fn_details_performance
|
|
rm -f .fn_details_performance
|
|
}
|
|
|
|
fn_details_disk(){
|
|
echo -e ""
|
|
echo -e "\e[93mStorage\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mFilesystem:\t\e[0m${filesystem}" >> .fn_details_disk
|
|
echo -e "\e[34mTotal:\t\e[0m${totalspace}" >> .fn_details_disk
|
|
echo -e "\e[34mUsed:\t\e[0m${usedspace}" >> .fn_details_disk
|
|
echo -e "\e[34mAvailable:\t\e[0m${availspace}" >> .fn_details_disk
|
|
echo -e "\e[34mServerfiles:\t\e[0m${serverfilesdu}" >> .fn_details_disk
|
|
if [ -d "${backupdir}" ]; then
|
|
echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" >> .fn_details_disk
|
|
fi
|
|
column -s $'\t' -t .fn_details_disk
|
|
rm -f .fn_details_disk
|
|
}
|
|
|
|
fn_details_gameserver(){
|
|
if [ ! -e ${servercfgfullpath} ]; then
|
|
servername="\e[0;31mCONFIG FILE MISSING!\e[0m"
|
|
rcon="\e[0;31mCONFIG FILE MISSING!\e[0m"
|
|
servercfgfullpath="${servercfgfullpath} \e[0;31mCONFIG FILE MISSING!!\e[0m"
|
|
fi
|
|
echo -e ""
|
|
echo -e "\e[92m${gamename} Server Details\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mServer name:\t\e[0m${servername}" >> .fn_details_gameserver
|
|
echo -e "\e[34mServer IP:\t\e[0m${ip}:${port}" >> .fn_details_gameserver
|
|
if [ ! -z "${rcon}" ]; then
|
|
echo -e "\e[34mRCON password:\t\e[0m${rcon}" >> .fn_details_gameserver
|
|
fi
|
|
|
|
if [ "${gamename}" == "Teamspeak 3" ]; then
|
|
fn_check_ts3status
|
|
if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
|
|
echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" >> .fn_details_gameserver
|
|
else
|
|
echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m" >> .fn_details_gameserver
|
|
fi
|
|
else
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
if [ "${pid}" == "0" ]; then
|
|
echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" >> .fn_details_gameserver
|
|
else
|
|
echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m" >> .fn_details_gameserver
|
|
fi
|
|
fi
|
|
column -s $'\t' -t .fn_details_gameserver
|
|
rm -f .fn_details_gameserver
|
|
echo -e ""
|
|
echo -e "\e[34mService name:\t\e[0m${servicename}" >> .fn_details_gameserver
|
|
if [ -n ${version} ]; then
|
|
echo -e "\e[34m${selfname} version:\t\e[0m${version}" >> .fn_details_gameserver
|
|
fi
|
|
echo -e "\e[34mUser:\t\e[0m$(whoami)" >> .fn_details_gameserver
|
|
echo -e "\e[34mLocation:\t\e[0m${rootdir}" >> .fn_details_gameserver
|
|
if [ ! -z "${servercfgfullpath}" ]; then
|
|
echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}" >> .fn_details_gameserver
|
|
fi
|
|
if [ "${gamename}" == "Teamspeak 3" ]; then
|
|
echo -e "\e[34mdbplugin:\t\e[0m${dbplugin}" >> .fn_details_gameserver
|
|
fi
|
|
column -s $'\t' -t .fn_details_gameserver
|
|
rm -f .fn_details_gameserver
|
|
}
|
|
|
|
fn_details_backup(){
|
|
echo -e ""
|
|
echo -e "\e[92mBackups\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
|
|
echo -e "No Backups created"
|
|
else
|
|
echo -e "\e[34mNo. of backups:\t\e[0m${backupcount}" >> .fn_details_backup
|
|
echo -e "\e[34mLatest backup:\e[0m" >> .fn_details_backup
|
|
echo -e "\e[34m date:\t\e[0m${lastbackupdate}" >> .fn_details_backup
|
|
echo -e "\e[34m file:\t\e[0m${lastbackup}" >> .fn_details_backup
|
|
echo -e "\e[34m size:\t\e[0m${lastbackupsize}" >> .fn_details_backup
|
|
column -s $'\t' -t .fn_details_backup
|
|
rm -f .fn_details_backup
|
|
fi
|
|
}
|
|
|
|
fn_details_commandlineparms(){
|
|
echo -e ""
|
|
echo -e "\e[92mCommand-line Parameters\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "${executable} ${parms}"
|
|
}
|
|
|
|
fn_details_statusbottom(){
|
|
echo -e ""
|
|
if [ "${gamename}" == "Teamspeak 3" ]; then
|
|
if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
|
|
echo -e "\e[34mStatus: \e[0;31mOFFLINE\e[0m"
|
|
else
|
|
echo -e "\e[34mStatus: \e[0;32mONLINE\e[0m"
|
|
fi
|
|
else
|
|
if [ "${pid}" == "0" ]; then
|
|
echo -e "\e[34mStatus: \e[0;31mOFFLINE\e[0m"
|
|
else
|
|
echo -e "\e[34mStatus: \e[0;32mONLINE\e[0m"
|
|
fi
|
|
fi
|
|
echo -e ""
|
|
}
|
|
|
|
# Engine Specific details
|
|
|
|
fn_details_avalanche(){
|
|
fn_check_ip
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the command-line"
|
|
echo -e "parameters in ${selfname}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep Jcmp-Server"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_dontstarve(){
|
|
fn_check_ip
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep dontstarve"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_projectzomboid(){
|
|
fn_check_ip
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep java"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
|
|
fn_details_realvirtuality(){
|
|
fn_check_ip
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep arma3server"
|
|
echo -e ""
|
|
if [ -z ${port} ] || [ -z ${queryport} ] || [ -z ${masterport} ] ; then
|
|
echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
|
|
echo -e ""
|
|
fi
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
|
|
echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_seriousengine35(){
|
|
fn_check_ip
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep Sam3_Dedicate"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" >> .fn_details_ports
|
|
echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_source(){
|
|
fn_check_ip
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the command-line"
|
|
echo -e "parameters in ${selfname}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep srcds_linux"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" >> .fn_details_ports
|
|
if [ ! -z "${sourcetvport}" ]; then
|
|
echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" >> .fn_details_ports
|
|
fi
|
|
echo -e "< Client\tOUTBOUND\t${clientport}\tudp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_spark(){
|
|
fn_check_ip
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the command-line"
|
|
echo -e "parameters in ${selfname}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep server_linux3"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
|
|
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
echo -e ""
|
|
echo -e "\e[92m${servername} WebAdmin\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_starbound(){
|
|
fn_check_ip
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the command-line"
|
|
echo -e "parameters in ${selfname}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep starbound"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game\tINBOUND\t${port}\ttcp" >> .fn_details_ports
|
|
echo -e "> Query\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
|
|
echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
|
|
}
|
|
|
|
fn_details_teamspeak3(){
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep ts3server"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Voice\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
|
|
echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_unity3d(){
|
|
fn_check_ip
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep 7DaysToDie"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
|
|
echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
|
|
echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
|
|
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
|
|
echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
echo -e ""
|
|
echo -e "\e[92m${servername} WebAdmin\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
echo -e ""
|
|
echo -e "\e[92m${servername} Telnet\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" >> .fn_details_ports
|
|
echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}" >> .fn_details_ports
|
|
echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
fn_details_unreal(){
|
|
fn_check_ip
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
fn_parms
|
|
fn_details_config
|
|
fn_details_distro
|
|
fn_details_os
|
|
fn_details_performance
|
|
fn_details_disk
|
|
fn_details_gameserver
|
|
fn_details_backup
|
|
fn_details_commandlineparms
|
|
echo -e ""
|
|
echo -e "\e[92mPorts\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "Change ports by editing the parameters in"
|
|
echo -e "${servercfgfullpath}."
|
|
echo -e ""
|
|
echo -e "Useful port diagnostic command:"
|
|
echo -e "netstat -atunp | grep ucc-bin"
|
|
echo -e ""
|
|
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" >> .fn_details_ports
|
|
echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" >> .fn_details_ports
|
|
echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
|
|
if [ "${engine}" == "unreal" ]; then
|
|
echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp" >> .fn_details_ports
|
|
fi
|
|
if [ "${engine}" != "unreal" ] && [ "${appid}" != "223250" ]; then
|
|
echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}" >> .fn_details_ports
|
|
fi
|
|
if [ "${appid}" == "215360" ]; then
|
|
echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp" >> .fn_details_ports
|
|
else
|
|
echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp" >> .fn_details_ports
|
|
fi
|
|
if [ "${appid}" ]; then
|
|
if [ "${appid}" == "223250" ]; then
|
|
echo -e "< Steam\tOUTBOUND\t20610\tudp" >> .fn_details_ports
|
|
else
|
|
echo -e "< Steam\tOUTBOUND\t20660\tudp" >> .fn_details_ports
|
|
fi
|
|
fi
|
|
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
echo -e ""
|
|
echo -e "\e[92m${servername} WebAdmin\e[0m"
|
|
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
|
|
echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin user:\t\e[0m${webadminuser}" >> .fn_details_ports
|
|
echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
|
|
column -s $'\t' -t .fn_details_ports
|
|
rm -f .fn_details_ports
|
|
fn_details_statusbottom
|
|
}
|
|
|
|
if [ "${engine}" == "avalanche" ]; then
|
|
fn_details_avalanche
|
|
elif [ "${engine}" == "dontstarve" ]; then
|
|
fn_details_dontstarve
|
|
elif [ "${engine}" == "projectzomboid" ]; then
|
|
fn_details_projectzomboid
|
|
elif [ "${engine}" == "realvirtuality" ]; then
|
|
fn_details_realvirtuality
|
|
elif [ "${engine}" == "seriousengine35" ]; then
|
|
fn_details_seriousengine35
|
|
elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
|
|
fn_details_source
|
|
elif [ "${engine}" == "spark" ]; then
|
|
fn_details_spark
|
|
elif [ "${engine}" == "starbound" ]; then
|
|
fn_details_starbound
|
|
elif [ "${engine}" == "unity3d" ]; then
|
|
fn_details_unity3d
|
|
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
|
|
fn_details_unreal
|
|
elif [ "${gamename}" == "Teamspeak 3" ]; then
|
|
fn_details_teamspeak3
|
|
else
|
|
fn_printerrornl "Unable to detect server engine."
|
|
fi
|
|
|