diff --git a/functions/fn_details b/functions/fn_details index 845eafca4..a69830fa9 100644 --- a/functions/fn_details +++ b/functions/fn_details @@ -2,7 +2,7 @@ # LGSM fn_details function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 301015 +# Version: 281015 # Description: Displays server infomation. @@ -20,7 +20,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mHostname:\t\e[0m$HOSTNAME" echo -e "\e[34mtmux:\t\e[0m${tmuxv}" echo -e "\e[34mGLIBC:\t\e[0m${glibcv}" -} | column -s $'\t' -t +} >> .fn_details_distro +column -s $'\t' -t .fn_details_distro +rm -f .fn_details_distro } fn_details_performance(){ @@ -30,13 +32,17 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = { echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m" echo -e "\e[34mAvg Load:\t\e[0m${load}" -} | column -s $'\t' -t +} >> .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" echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m" echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m" -} | column -s $'\t' -t +} >> .fn_details_performance +column -s $'\t' -t .fn_details_performance +rm -f .fn_details_performance } fn_details_disk(){ @@ -52,7 +58,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = if [ -d "${backupdir}" ]; then echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" fi -} | column -s $'\t' -t +} >> .fn_details_disk +column -s $'\t' -t .fn_details_disk +rm -f .fn_details_disk } fn_details_gameserver(){ @@ -124,7 +132,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = if [ -n "${dbplugin}" ]; then echo -e "\e[34mdbplugin:\t\e[0m${dbplugin}" fi -} | column -s $'\t' -t +} >> .fn_details_gameserver +column -s $'\t' -t .fn_details_gameserver +rm -f .fn_details_gameserver echo -e "" ## script details @@ -177,7 +187,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = if [ -n "${networkcfgfullpath}" ]; then echo -e "\e[34mNetwork config file:\t\e[0m${networkcfgfullpath}" fi -} | column -s $'\t' -t +} >> .fn_details_script +column -s $'\t' -t .fn_details_script +rm -f .fn_details_script } fn_details_backup(){ @@ -193,7 +205,9 @@ else echo -e "\e[34m date:\t\e[0m${lastbackupdate}" echo -e "\e[34m file:\t\e[0m${lastbackup}" echo -e "\e[34m size:\t\e[0m${lastbackupsize}" - } | column -s $'\t' -t + } >> .fn_details_backup + column -s $'\t' -t .fn_details_backup + rm -f .fn_details_backup fi } @@ -246,8 +260,9 @@ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -273,8 +288,9 @@ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -300,8 +316,9 @@ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -336,8 +353,9 @@ fi echo -e "> Game\tINBOUND\t${port}\tudp" echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -366,8 +384,9 @@ echo -e "" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" echo -e "> Query\tINBOUND\t${queryport}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -398,8 +417,9 @@ echo -e "" echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" fi echo -e "< Client\tOUTBOUND\t${clientport}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -429,7 +449,9 @@ echo -e "" echo -e "> Game/RCON\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" -} | column -s $'\t' -t +} >> .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 ' ' = @@ -437,8 +459,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html" echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}" echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -467,8 +490,9 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\ttcp" echo -e "> Query\tINBOUND\t${queryport}\ttcp" echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -496,8 +520,9 @@ echo -e "" echo -e "> Voice\tINBOUND\t${port}\tudp" echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp" echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -524,8 +549,9 @@ echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" echo -e "> Game\tINBOUND\t${port}\ttcp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -554,8 +580,9 @@ echo -e "" echo -e "> Game\tINBOUND\t${port}\ttcp" echo -e "> Query\tINBOUND\t${queryport}\ttcp" echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -586,7 +613,9 @@ echo -e "" echo -e "> Query\tINBOUND\t${queryport}\tudp" echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" -} | column -s $'\t' -t +} >> .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 ' ' = @@ -594,7 +623,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" -} | column -s $'\t' -t +} >> .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 ' ' = @@ -602,8 +633,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}" echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom } @@ -651,7 +683,9 @@ echo -e "" fi fi echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" -} | column -s $'\t' -t +} >> .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 ' ' = @@ -660,8 +694,9 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}" echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" -} | column -s $'\t' -t - +} >> .fn_details_webadmin +column -s $'\t' -t .fn_details_webadmin +rm -f .fn_details_webadmin fn_details_statusbottom } @@ -690,8 +725,9 @@ echo -e "" echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" echo -e "> Query\tINBOUND\t${queryport}\tudp" -} | column -s $'\t' -t - +} >> .fn_details_ports +column -s $'\t' -t .fn_details_ports +rm -f .fn_details_ports fn_details_statusbottom }