fn_details 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. #!/bin/bash
  2. # LGSM fn_details function
  3. # Author: Daniel Gibbs
  4. # Website: http://danielgibbs.co.uk
  5. # Version: 230214
  6. # Description: Displays server infomation.
  7. # Standard Details
  8. # This applies to all engines
  9. fn_details_os(){
  10. echo -e ""
  11. echo -e "\e[93mDistro Details\e[0m"
  12. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  13. echo -e "\e[34mDistro:\t\e[0m${os}" >> .fn_details_distro
  14. echo -e "\e[34mArch:\t\e[0m${arch}" >> .fn_details_distro
  15. echo -e "\e[34mKernel:\t\e[0m${kernel}" >> .fn_details_distro
  16. echo -e "\e[34mHostname:\t\e[0m$HOSTNAME" >> .fn_details_distro
  17. echo -e "\e[34mtmux:\t\e[0m${tmuxv}" >> .fn_details_distro
  18. echo -e "\e[34mGLIBC:\t\e[0m${glibcv}" >> .fn_details_distro
  19. column -s $'\t' -t .fn_details_distro
  20. rm -f .fn_details_distro
  21. }
  22. fn_details_performance(){
  23. echo -e ""
  24. echo -e "\e[93mPerformance\e[0m"
  25. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  26. echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m" >> .fn_details_performance
  27. echo -e "\e[34mAvg Load:\t\e[0m${load}" >> .fn_details_performance
  28. column -s $'\t' -t .fn_details_performance
  29. rm -f .fn_details_performance
  30. echo -e ""
  31. echo -e "\e[34mMem:\t\e[34mtotal\t used\t free\e[0m" >> .fn_details_performance
  32. echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m" >> .fn_details_performance
  33. echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m" >> .fn_details_performance
  34. column -s $'\t' -t .fn_details_performance
  35. rm -f .fn_details_performance
  36. }
  37. fn_details_disk(){
  38. echo -e ""
  39. echo -e "\e[93mDisk Usage\e[0m"
  40. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  41. echo -e "\e[34mDisk available:\t\e[0m${availspace}" >> .fn_details_disk
  42. echo -e "\e[34mServerfiles:\t\e[0m${serverfilesdu}" >> .fn_details_disk
  43. if [ -d "${backupdir}" ]; then
  44. echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" >> .fn_details_disk
  45. fi
  46. column -s $'\t' -t .fn_details_disk
  47. rm -f .fn_details_disk
  48. }
  49. fn_details_gameserver(){
  50. if [ ! -e ${servercfgfullpath} ]; then
  51. servername="\e[0;31mCONFIG FILE MISSING!\e[0m"
  52. rcon="\e[0;31mCONFIG FILE MISSING!\e[0m"
  53. servercfgfullpath="${servercfgfullpath} \e[0;31mCONFIG FILE MISSING!!\e[0m"
  54. fi
  55. echo -e ""
  56. echo -e "\e[92m${gamename} Server Details\e[0m"
  57. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  58. echo -e "\e[34mServer name:\t\e[0m${servername}" >> .fn_details_gameserver
  59. echo -e "\e[34mServer IP:\t\e[0m${ip}:${port}" >> .fn_details_gameserver
  60. if [ ! -z "${rcon}" ]; then
  61. echo -e "\e[34mRCON password:\t\e[0m${rcon}" >> .fn_details_gameserver
  62. fi
  63. if [ "${gamename}" == "Teamspeak 3" ]; then
  64. fn_check_ts3status
  65. if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
  66. echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" >> .fn_details_gameserver
  67. else
  68. echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m" >> .fn_details_gameserver
  69. fi
  70. else
  71. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  72. if [ "${pid}" == "0" ]; then
  73. echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m" >> .fn_details_gameserver
  74. else
  75. echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m" >> .fn_details_gameserver
  76. fi
  77. fi
  78. column -s $'\t' -t .fn_details_gameserver
  79. rm -f .fn_details_gameserver
  80. echo -e ""
  81. echo -e "\e[34mService name:\t\e[0m${servicename}" >> .fn_details_gameserver
  82. echo -e "\e[34mUser:\t\e[0m$(whoami)" >> .fn_details_gameserver
  83. echo -e "\e[34mLocation:\t\e[0m${rootdir}" >> .fn_details_gameserver
  84. if [ ! -z "${servercfgfullpath}" ]; then
  85. echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}" >> .fn_details_gameserver
  86. fi
  87. if [ "${gamename}" == "Teamspeak 3" ]; then
  88. echo -e "\e[34mdbplugin:\t\e[0m${dbplugin}" >> .fn_details_gameserver
  89. fi
  90. column -s $'\t' -t .fn_details_gameserver
  91. rm -f .fn_details_gameserver
  92. }
  93. fn_details_backup(){
  94. echo -e ""
  95. echo -e "\e[92mBackups\e[0m"
  96. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  97. if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
  98. echo -e "No Backups created"
  99. else
  100. echo -e "\e[34mNo. of backups:\t\e[0m${backupcount}" >> .fn_details_backup
  101. echo -e "\e[34mLatest backup:\e[0m" >> .fn_details_backup
  102. echo -e "\e[34m date:\t\e[0m${lastbackupdate}" >> .fn_details_backup
  103. echo -e "\e[34m file:\t\e[0m${lastbackup}" >> .fn_details_backup
  104. echo -e "\e[34m size:\t\e[0m${lastbackupsize}" >> .fn_details_backup
  105. column -s $'\t' -t .fn_details_backup
  106. rm -f .fn_details_backup
  107. fi
  108. }
  109. fn_details_commandlineparms(){
  110. echo -e ""
  111. echo -e "\e[92mCommand-line Parameters\e[0m"
  112. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  113. echo -e "${executable} ${parms}"
  114. }
  115. fn_details_statusbottom(){
  116. echo -e ""
  117. if [ "${gamename}" == "Teamspeak 3" ]; then
  118. if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
  119. echo -e "\e[34mStatus: \e[0;31mOFFLINE\e[0m"
  120. else
  121. echo -e "\e[34mStatus: \e[0;32mONLINE\e[0m"
  122. fi
  123. else
  124. if [ "${pid}" == "0" ]; then
  125. echo -e "\e[34mStatus: \e[0;31mOFFLINE\e[0m"
  126. else
  127. echo -e "\e[34mStatus: \e[0;32mONLINE\e[0m"
  128. fi
  129. fi
  130. echo -e ""
  131. }
  132. # Engine Specific details
  133. fn_details_avalanche(){
  134. fn_check_ip
  135. fn_details_config
  136. fn_details_distro
  137. fn_details_os
  138. fn_details_performance
  139. fn_details_disk
  140. fn_details_gameserver
  141. fn_details_backup
  142. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  143. echo -e ""
  144. echo -e "\e[92mPorts\e[0m"
  145. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  146. echo -e "Change ports by editing the command-line"
  147. echo -e "parameters in ${selfname}."
  148. echo -e ""
  149. echo -e "Useful port diagnostic command:"
  150. echo -e "netstat -atunp | grep Jcmp-Server"
  151. echo -e ""
  152. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  153. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  154. column -s $'\t' -t .fn_details_ports
  155. rm -f .fn_details_ports
  156. fn_details_statusbottom
  157. }
  158. fn_details_realvirtuality(){
  159. fn_check_ip
  160. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  161. fn_parms
  162. fn_details_config
  163. fn_details_distro
  164. fn_details_os
  165. fn_details_performance
  166. fn_details_disk
  167. fn_details_gameserver
  168. fn_details_backup
  169. fn_details_commandlineparms
  170. echo -e ""
  171. echo -e "\e[92mPorts\e[0m"
  172. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  173. echo -e "Change ports by editing the parameters in"
  174. echo -e "${servercfgfullpath}."
  175. echo -e ""
  176. echo -e "Useful port diagnostic command:"
  177. echo -e "netstat -atunp | grep arma3server"
  178. echo -e ""
  179. if [ -z ${port} ] || [ -z ${queryport} ] || [ -z ${masterport} ] ; then
  180. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  181. echo -e ""
  182. fi
  183. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  184. echo -e "> Game\tINBOUND\t${port}\tudp" >> .fn_details_ports
  185. echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  186. echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" >> .fn_details_ports
  187. column -s $'\t' -t .fn_details_ports
  188. rm -f .fn_details_ports
  189. fn_details_statusbottom
  190. }
  191. fn_details_seriousengine35(){
  192. fn_check_ip
  193. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  194. fn_parms
  195. fn_details_config
  196. fn_details_distro
  197. fn_details_os
  198. fn_details_performance
  199. fn_details_disk
  200. fn_details_gameserver
  201. fn_details_backup
  202. fn_details_commandlineparms
  203. echo -e ""
  204. echo -e "\e[92mPorts\e[0m"
  205. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  206. echo -e "Change ports by editing the parameters in"
  207. echo -e "${servercfgfullpath}."
  208. echo -e ""
  209. echo -e "Useful port diagnostic command:"
  210. echo -e "netstat -atunp | grep Sam3_Dedicate"
  211. echo -e ""
  212. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  213. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" >> .fn_details_ports
  214. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  215. column -s $'\t' -t .fn_details_ports
  216. rm -f .fn_details_ports
  217. fn_details_statusbottom
  218. }
  219. fn_details_source(){
  220. fn_check_ip
  221. fn_parms
  222. fn_details_config
  223. fn_details_distro
  224. fn_details_os
  225. fn_details_performance
  226. fn_details_disk
  227. fn_details_gameserver
  228. fn_details_backup
  229. fn_details_commandlineparms
  230. echo -e ""
  231. echo -e "\e[92mPorts\e[0m"
  232. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  233. echo -e "Change ports by editing the command-line"
  234. echo -e "parameters in ${selfname}."
  235. echo -e ""
  236. echo -e "Useful port diagnostic command:"
  237. echo -e "netstat -atunp | grep srcds_linux"
  238. echo -e ""
  239. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  240. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" >> .fn_details_ports
  241. if [ ! -z "${sourcetvport}" ]; then
  242. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" >> .fn_details_ports
  243. fi
  244. echo -e "< Client\tOUTBOUND\t${clientport}\tudp" >> .fn_details_ports
  245. column -s $'\t' -t .fn_details_ports
  246. rm -f .fn_details_ports
  247. fn_details_statusbottom
  248. }
  249. fn_details_spark(){
  250. fn_check_ip
  251. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  252. fn_parms
  253. fn_details_config
  254. fn_details_distro
  255. fn_details_os
  256. fn_details_performance
  257. fn_details_disk
  258. fn_details_gameserver
  259. fn_details_backup
  260. fn_details_commandlineparms
  261. echo -e ""
  262. echo -e "\e[92mPorts\e[0m"
  263. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  264. echo -e "Change ports by editing the command-line"
  265. echo -e "parameters in ${selfname}."
  266. echo -e ""
  267. echo -e "Useful port diagnostic command:"
  268. echo -e "netstat -atunp | grep server_linux3"
  269. echo -e ""
  270. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  271. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  272. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  273. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
  274. column -s $'\t' -t .fn_details_ports
  275. rm -f .fn_details_ports
  276. echo -e ""
  277. echo -e "\e[92m${servername} WebAdmin\e[0m"
  278. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  279. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html" >> .fn_details_ports
  280. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}" >> .fn_details_ports
  281. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  282. column -s $'\t' -t .fn_details_ports
  283. rm -f .fn_details_ports
  284. fn_details_statusbottom
  285. }
  286. fn_details_starbound(){
  287. fn_check_ip
  288. fn_parms
  289. fn_details_config
  290. fn_details_distro
  291. fn_details_os
  292. fn_details_performance
  293. fn_details_disk
  294. fn_details_gameserver
  295. fn_details_backup
  296. fn_details_commandlineparms
  297. echo -e ""
  298. echo -e "\e[92mPorts\e[0m"
  299. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  300. echo -e "Change ports by editing the command-line"
  301. echo -e "parameters in ${selfname}."
  302. echo -e ""
  303. echo -e "Useful port diagnostic command:"
  304. echo -e "netstat -atunp | grep starbound"
  305. echo -e ""
  306. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  307. echo -e "> Game\tINBOUND\t${port}\ttcp" >> .fn_details_ports
  308. echo -e "> Query\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
  309. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" >> .fn_details_ports
  310. column -s $'\t' -t .fn_details_ports
  311. rm -f .fn_details_ports
  312. fn_details_statusbottom
  313. }
  314. fn_details_teamspeak3(){
  315. fn_details_config
  316. fn_details_distro
  317. fn_details_os
  318. fn_details_performance
  319. fn_details_disk
  320. fn_details_gameserver
  321. fn_details_backup
  322. fn_details_commandlineparms
  323. echo -e ""
  324. echo -e "\e[92mPorts\e[0m"
  325. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  326. echo -e "Change ports by editing the command-line"
  327. echo -e "parameters in ${selfname}."
  328. echo -e ""
  329. echo -e "Useful port diagnostic command:"
  330. echo -e "netstat -atunp | grep ts3server"
  331. echo -e ""
  332. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  333. echo -e "> Voice\tINBOUND\t${port}\tudp" >> .fn_details_ports
  334. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
  335. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" >> .fn_details_ports
  336. column -s $'\t' -t .fn_details_ports
  337. rm -f .fn_details_ports
  338. fn_details_statusbottom
  339. }
  340. fn_details_unity3d(){
  341. fn_check_ip
  342. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  343. fn_parms
  344. fn_details_config
  345. fn_details_distro
  346. fn_details_os
  347. fn_details_performance
  348. fn_details_disk
  349. fn_details_gameserver
  350. fn_details_backup
  351. fn_details_commandlineparms
  352. echo -e ""
  353. echo -e "\e[92mPorts\e[0m"
  354. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  355. echo -e "Change ports by editing the parameters in"
  356. echo -e "${servercfgfullpath}."
  357. echo -e ""
  358. echo -e "Useful port diagnostic command:"
  359. echo -e "netstat -atunp | grep 7DaysToDie"
  360. echo -e ""
  361. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  362. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  363. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  364. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
  365. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" >> .fn_details_ports
  366. column -s $'\t' -t .fn_details_ports
  367. rm -f .fn_details_ports
  368. echo -e ""
  369. echo -e "\e[92m${servername} WebAdmin\e[0m"
  370. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  371. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
  372. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
  373. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  374. column -s $'\t' -t .fn_details_ports
  375. rm -f .fn_details_ports
  376. echo -e ""
  377. echo -e "\e[92m${servername} Telnet\e[0m"
  378. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  379. echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" >> .fn_details_ports
  380. echo -e "\e[34mTelnet address:\t\e[0m${ip}:${telnetport}" >> .fn_details_ports
  381. echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" >> .fn_details_ports
  382. column -s $'\t' -t .fn_details_ports
  383. rm -f .fn_details_ports
  384. fn_details_statusbottom
  385. }
  386. fn_details_unreal(){
  387. fn_check_ip
  388. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  389. fn_parms
  390. fn_details_config
  391. fn_details_distro
  392. fn_details_os
  393. fn_details_performance
  394. fn_details_disk
  395. fn_details_gameserver
  396. fn_details_backup
  397. fn_details_commandlineparms
  398. echo -e ""
  399. echo -e "\e[92mPorts\e[0m"
  400. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  401. echo -e "Change ports by editing the parameters in"
  402. echo -e "${servercfgfullpath}."
  403. echo -e ""
  404. echo -e "Useful port diagnostic command:"
  405. echo -e "netstat -atunp | grep ucc-bin"
  406. echo -e ""
  407. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" >> .fn_details_ports
  408. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" >> .fn_details_ports
  409. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  410. if [ "${engine}" == "unreal" ]; then
  411. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp" >> .fn_details_ports
  412. fi
  413. if [ "${engine}" != "unreal" ] && [ "${appid}" != "223250" ]; then
  414. echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}" >> .fn_details_ports
  415. fi
  416. if [ "${appid}" == "215360" ]; then
  417. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp" >> .fn_details_ports
  418. else
  419. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp" >> .fn_details_ports
  420. fi
  421. if [ "${appid}" ]; then
  422. if [ "${appid}" == "223250" ]; then
  423. echo -e "< Steam\tOUTBOUND\t20610\tudp" >> .fn_details_ports
  424. else
  425. echo -e "< Steam\tOUTBOUND\t20660\tudp" >> .fn_details_ports
  426. fi
  427. fi
  428. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" >> .fn_details_ports
  429. column -s $'\t' -t .fn_details_ports
  430. rm -f .fn_details_ports
  431. echo -e ""
  432. echo -e "\e[92m${servername} WebAdmin\e[0m"
  433. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  434. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
  435. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
  436. echo -e "\e[34mWebAdmin user:\t\e[0m${webadminuser}" >> .fn_details_ports
  437. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  438. column -s $'\t' -t .fn_details_ports
  439. rm -f .fn_details_ports
  440. fn_details_statusbottom
  441. }
  442. if [ "${engine}" == "avalanche" ]; then
  443. fn_details_avalanche
  444. elif [ "${engine}" == "realvirtuality" ]; then
  445. fn_details_realvirtuality
  446. elif [ "${engine}" == "seriousengine35" ]; then
  447. fn_details_seriousengine35
  448. elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
  449. fn_details_source
  450. elif [ "${engine}" == "spark" ]; then
  451. fn_details_spark
  452. elif [ "${engine}" == "starbound" ]; then
  453. fn_details_starbound
  454. elif [ "${engine}" == "unity3d" ]; then
  455. fn_details_unity3d
  456. elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
  457. fn_details_unreal
  458. elif [ "${gamename}" == "Teamspeak 3" ]; then
  459. fn_details_teamspeak3
  460. else
  461. fn_printerrornl "Unable to detect server engine."
  462. fi