fn_details 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. #!/bin/bash
  2. # LGSM fn_details function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. # Version: 190414
  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_projectzomboid(){
  159. fn_check_ip
  160. fn_details_config
  161. fn_details_distro
  162. fn_details_os
  163. fn_details_performance
  164. fn_details_disk
  165. fn_details_gameserver
  166. fn_details_backup
  167. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  168. echo -e ""
  169. echo -e "\e[92mPorts\e[0m"
  170. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  171. echo -e "Change ports by editing the command-line"
  172. echo -e "parameters in ${selfname}."
  173. echo -e ""
  174. echo -e "Useful port diagnostic command:"
  175. echo -e "netstat -atunp | grep java"
  176. echo -e ""
  177. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  178. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  179. column -s $'\t' -t .fn_details_ports
  180. rm -f .fn_details_ports
  181. fn_details_statusbottom
  182. }
  183. fn_details_realvirtuality(){
  184. fn_check_ip
  185. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  186. fn_parms
  187. fn_details_config
  188. fn_details_distro
  189. fn_details_os
  190. fn_details_performance
  191. fn_details_disk
  192. fn_details_gameserver
  193. fn_details_backup
  194. fn_details_commandlineparms
  195. echo -e ""
  196. echo -e "\e[92mPorts\e[0m"
  197. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  198. echo -e "Change ports by editing the parameters in"
  199. echo -e "${servercfgfullpath}."
  200. echo -e ""
  201. echo -e "Useful port diagnostic command:"
  202. echo -e "netstat -atunp | grep arma3server"
  203. echo -e ""
  204. if [ -z ${port} ] || [ -z ${queryport} ] || [ -z ${masterport} ] ; then
  205. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  206. echo -e ""
  207. fi
  208. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  209. echo -e "> Game\tINBOUND\t${port}\tudp" >> .fn_details_ports
  210. echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  211. echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp" >> .fn_details_ports
  212. column -s $'\t' -t .fn_details_ports
  213. rm -f .fn_details_ports
  214. fn_details_statusbottom
  215. }
  216. fn_details_seriousengine35(){
  217. fn_check_ip
  218. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  219. fn_parms
  220. fn_details_config
  221. fn_details_distro
  222. fn_details_os
  223. fn_details_performance
  224. fn_details_disk
  225. fn_details_gameserver
  226. fn_details_backup
  227. fn_details_commandlineparms
  228. echo -e ""
  229. echo -e "\e[92mPorts\e[0m"
  230. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  231. echo -e "Change ports by editing the parameters in"
  232. echo -e "${servercfgfullpath}."
  233. echo -e ""
  234. echo -e "Useful port diagnostic command:"
  235. echo -e "netstat -atunp | grep Sam3_Dedicate"
  236. echo -e ""
  237. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  238. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp" >> .fn_details_ports
  239. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  240. column -s $'\t' -t .fn_details_ports
  241. rm -f .fn_details_ports
  242. fn_details_statusbottom
  243. }
  244. fn_details_source(){
  245. fn_check_ip
  246. fn_parms
  247. fn_details_config
  248. fn_details_distro
  249. fn_details_os
  250. fn_details_performance
  251. fn_details_disk
  252. fn_details_gameserver
  253. fn_details_backup
  254. fn_details_commandlineparms
  255. echo -e ""
  256. echo -e "\e[92mPorts\e[0m"
  257. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  258. echo -e "Change ports by editing the command-line"
  259. echo -e "parameters in ${selfname}."
  260. echo -e ""
  261. echo -e "Useful port diagnostic command:"
  262. echo -e "netstat -atunp | grep srcds_linux"
  263. echo -e ""
  264. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  265. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp" >> .fn_details_ports
  266. if [ ! -z "${sourcetvport}" ]; then
  267. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp" >> .fn_details_ports
  268. fi
  269. echo -e "< Client\tOUTBOUND\t${clientport}\tudp" >> .fn_details_ports
  270. column -s $'\t' -t .fn_details_ports
  271. rm -f .fn_details_ports
  272. fn_details_statusbottom
  273. }
  274. fn_details_spark(){
  275. fn_check_ip
  276. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  277. fn_parms
  278. fn_details_config
  279. fn_details_distro
  280. fn_details_os
  281. fn_details_performance
  282. fn_details_disk
  283. fn_details_gameserver
  284. fn_details_backup
  285. fn_details_commandlineparms
  286. echo -e ""
  287. echo -e "\e[92mPorts\e[0m"
  288. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  289. echo -e "Change ports by editing the command-line"
  290. echo -e "parameters in ${selfname}."
  291. echo -e ""
  292. echo -e "Useful port diagnostic command:"
  293. echo -e "netstat -atunp | grep server_linux3"
  294. echo -e ""
  295. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  296. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  297. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  298. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
  299. column -s $'\t' -t .fn_details_ports
  300. rm -f .fn_details_ports
  301. echo -e ""
  302. echo -e "\e[92m${servername} WebAdmin\e[0m"
  303. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  304. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html" >> .fn_details_ports
  305. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}" >> .fn_details_ports
  306. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  307. column -s $'\t' -t .fn_details_ports
  308. rm -f .fn_details_ports
  309. fn_details_statusbottom
  310. }
  311. fn_details_starbound(){
  312. fn_check_ip
  313. fn_parms
  314. fn_details_config
  315. fn_details_distro
  316. fn_details_os
  317. fn_details_performance
  318. fn_details_disk
  319. fn_details_gameserver
  320. fn_details_backup
  321. fn_details_commandlineparms
  322. echo -e ""
  323. echo -e "\e[92mPorts\e[0m"
  324. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  325. echo -e "Change ports by editing the command-line"
  326. echo -e "parameters in ${selfname}."
  327. echo -e ""
  328. echo -e "Useful port diagnostic command:"
  329. echo -e "netstat -atunp | grep starbound"
  330. echo -e ""
  331. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  332. echo -e "> Game\tINBOUND\t${port}\ttcp" >> .fn_details_ports
  333. echo -e "> Query\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
  334. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp" >> .fn_details_ports
  335. column -s $'\t' -t .fn_details_ports
  336. rm -f .fn_details_ports
  337. fn_details_statusbottom
  338. }
  339. fn_details_teamspeak3(){
  340. fn_details_config
  341. fn_details_distro
  342. fn_details_os
  343. fn_details_performance
  344. fn_details_disk
  345. fn_details_gameserver
  346. fn_details_backup
  347. fn_details_commandlineparms
  348. echo -e ""
  349. echo -e "\e[92mPorts\e[0m"
  350. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  351. echo -e "Change ports by editing the command-line"
  352. echo -e "parameters in ${selfname}."
  353. echo -e ""
  354. echo -e "Useful port diagnostic command:"
  355. echo -e "netstat -atunp | grep ts3server"
  356. echo -e ""
  357. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  358. echo -e "> Voice\tINBOUND\t${port}\tudp" >> .fn_details_ports
  359. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp" >> .fn_details_ports
  360. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp" >> .fn_details_ports
  361. column -s $'\t' -t .fn_details_ports
  362. rm -f .fn_details_ports
  363. fn_details_statusbottom
  364. }
  365. fn_details_unity3d(){
  366. fn_check_ip
  367. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  368. fn_parms
  369. fn_details_config
  370. fn_details_distro
  371. fn_details_os
  372. fn_details_performance
  373. fn_details_disk
  374. fn_details_gameserver
  375. fn_details_backup
  376. fn_details_commandlineparms
  377. echo -e ""
  378. echo -e "\e[92mPorts\e[0m"
  379. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  380. echo -e "Change ports by editing the parameters in"
  381. echo -e "${servercfgfullpath}."
  382. echo -e ""
  383. echo -e "Useful port diagnostic command:"
  384. echo -e "netstat -atunp | grep 7DaysToDie"
  385. echo -e ""
  386. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" >> .fn_details_ports
  387. echo -e "> Game/RCON\tINBOUND\t${port}\tudp" >> .fn_details_ports
  388. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  389. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp" >> .fn_details_ports
  390. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp" >> .fn_details_ports
  391. column -s $'\t' -t .fn_details_ports
  392. rm -f .fn_details_ports
  393. echo -e ""
  394. echo -e "\e[92m${servername} WebAdmin\e[0m"
  395. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  396. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
  397. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
  398. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  399. column -s $'\t' -t .fn_details_ports
  400. rm -f .fn_details_ports
  401. echo -e ""
  402. echo -e "\e[92m${servername} Telnet\e[0m"
  403. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  404. echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}" >> .fn_details_ports
  405. echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}" >> .fn_details_ports
  406. echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}" >> .fn_details_ports
  407. column -s $'\t' -t .fn_details_ports
  408. rm -f .fn_details_ports
  409. fn_details_statusbottom
  410. }
  411. fn_details_unreal(){
  412. fn_check_ip
  413. pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
  414. fn_parms
  415. fn_details_config
  416. fn_details_distro
  417. fn_details_os
  418. fn_details_performance
  419. fn_details_disk
  420. fn_details_gameserver
  421. fn_details_backup
  422. fn_details_commandlineparms
  423. echo -e ""
  424. echo -e "\e[92mPorts\e[0m"
  425. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  426. echo -e "Change ports by editing the parameters in"
  427. echo -e "${servercfgfullpath}."
  428. echo -e ""
  429. echo -e "Useful port diagnostic command:"
  430. echo -e "netstat -atunp | grep ucc-bin"
  431. echo -e ""
  432. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE" >> .fn_details_ports
  433. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}" >> .fn_details_ports
  434. echo -e "> Query\tINBOUND\t${queryport}\tudp" >> .fn_details_ports
  435. if [ "${engine}" == "unreal" ]; then
  436. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp" >> .fn_details_ports
  437. fi
  438. if [ "${engine}" != "unreal" ] && [ "${appid}" != "223250" ]; then
  439. echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}" >> .fn_details_ports
  440. fi
  441. if [ "${appid}" == "215360" ]; then
  442. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp" >> .fn_details_ports
  443. else
  444. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp" >> .fn_details_ports
  445. fi
  446. if [ "${appid}" ]; then
  447. if [ "${appid}" == "223250" ]; then
  448. echo -e "< Steam\tOUTBOUND\t20610\tudp" >> .fn_details_ports
  449. else
  450. echo -e "< Steam\tOUTBOUND\t20660\tudp" >> .fn_details_ports
  451. fi
  452. fi
  453. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" >> .fn_details_ports
  454. column -s $'\t' -t .fn_details_ports
  455. rm -f .fn_details_ports
  456. echo -e ""
  457. echo -e "\e[92m${servername} WebAdmin\e[0m"
  458. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  459. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}" >> .fn_details_ports
  460. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}" >> .fn_details_ports
  461. echo -e "\e[34mWebAdmin user:\t\e[0m${webadminuser}" >> .fn_details_ports
  462. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}" >> .fn_details_ports
  463. column -s $'\t' -t .fn_details_ports
  464. rm -f .fn_details_ports
  465. fn_details_statusbottom
  466. }
  467. if [ "${engine}" == "avalanche" ]; then
  468. fn_details_avalanche
  469. elif [ "${engine}" == "projectzomboid" ]; then
  470. fn_details_projectzomboid
  471. elif [ "${engine}" == "realvirtuality" ]; then
  472. fn_details_realvirtuality
  473. elif [ "${engine}" == "seriousengine35" ]; then
  474. fn_details_seriousengine35
  475. elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
  476. fn_details_source
  477. elif [ "${engine}" == "spark" ]; then
  478. fn_details_spark
  479. elif [ "${engine}" == "starbound" ]; then
  480. fn_details_starbound
  481. elif [ "${engine}" == "unity3d" ]; then
  482. fn_details_unity3d
  483. elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
  484. fn_details_unreal
  485. elif [ "${gamename}" == "Teamspeak 3" ]; then
  486. fn_details_teamspeak3
  487. else
  488. fn_printerrornl "Unable to detect server engine."
  489. fi