command_details.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. #!/bin/bash
  2. # LGSM command_details.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Displays server infomation.
  6. local modulename="Details"
  7. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  8. # Standard Details
  9. # This applies to all engines
  10. fn_details_os(){
  11. #
  12. # Distro Details
  13. # =====================================
  14. # Distro: Ubuntu 14.04.4 LTS
  15. # Arch: x86_64
  16. # Kernel: 3.13.0-79-generic
  17. # Hostname: hostname
  18. # tmux: tmux 1.8
  19. # GLIBC: 2.19
  20. echo -e ""
  21. echo -e "\e[93mDistro Details\e[0m"
  22. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  23. {
  24. echo -e "\e[34mDistro:\t\e[0m${os}"
  25. echo -e "\e[34mArch:\t\e[0m${arch}"
  26. echo -e "\e[34mKernel:\t\e[0m${kernel}"
  27. echo -e "\e[34mHostname:\t\e[0m$HOSTNAME"
  28. echo -e "\e[34mtmux:\t\e[0m${tmuxv}"
  29. echo -e "\e[34mGLIBC:\t\e[0m${glibcversion}"
  30. } | column -s $'\t' -t
  31. }
  32. fn_details_performance(){
  33. #
  34. # Performance
  35. # =====================================
  36. # Uptime: 55d, 3h, 38m
  37. # Avg Load: 1.00, 1.01, 0.78
  38. #
  39. # Mem: total used free
  40. # Physical: 741M 656M 85M
  41. # Swap: 0B 0B 0B
  42. echo -e ""
  43. echo -e "\e[93mPerformance\e[0m"
  44. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  45. {
  46. echo -e "\e[34mUptime:\t\e[0m${days}d, ${hours}h, ${minutes}m"
  47. echo -e "\e[34mAvg Load:\t\e[0m${load}"
  48. } | column -s $'\t' -t
  49. echo -e ""
  50. {
  51. echo -e "\e[34mMem:\t\e[34mtotal\t used\t free\e[0m"
  52. echo -e "\e[34mPhysical:\t\e[0m${physmemtotal}\t${physmemused}\t${physmemfree}\e[0m"
  53. echo -e "\e[34mSwap:\t\e[0m${swaptotal}\t${swapused}\t${swapfree}\e[0m"
  54. } | column -s $'\t' -t
  55. }
  56. fn_details_disk(){
  57. #
  58. # Storage
  59. # =====================================
  60. # Filesystem: /dev/disk/by-uuid/320c8edd-a2ce-4a23-8c9d-e00a7af2d6ff
  61. # Total: 15G
  62. # Used: 8.4G
  63. # Available: 5.7G
  64. # LGSM Total: 1G
  65. # Serverfiles: 961M
  66. # Backups: 2G
  67. echo -e ""
  68. echo -e "\e[93mStorage\e[0m"
  69. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  70. {
  71. echo -e "\e[34mFilesystem:\t\e[0m${filesystem}"
  72. echo -e "\e[34mTotal:\t\e[0m${totalspace}"
  73. echo -e "\e[34mUsed:\t\e[0m${usedspace}"
  74. echo -e "\e[34mAvailable:\t\e[0m${availspace}"
  75. echo -e "\e[34mLGSM Total:\t\e[0m${rootdirdu}"
  76. echo -e "\e[34mServerfiles:\t\e[0m${filesdirdu}"
  77. if [ -d "${backupdir}" ]; then
  78. echo -e "\e[34mBackups:\t\e[0m${backupdirdu}"
  79. fi
  80. } | column -s $'\t' -t
  81. }
  82. fn_details_gameserver(){
  83. #
  84. # Quake Live Server Details
  85. # =====================================
  86. # Server name: ql-server
  87. # Server IP: 1.2.3.4:27960
  88. # RCON password: CHANGE_ME
  89. # Server password: NOT SET
  90. # Slots: 16
  91. # Status: OFFLINE
  92. echo -e ""
  93. echo -e "\e[92m${gamename} Server Details\e[0m"
  94. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  95. {
  96. # Server name
  97. echo -e "\e[34mServer name:\t\e[0m${servername}"
  98. # Server ip
  99. echo -e "\e[34mServer IP:\t\e[0m${ip}:${port}"
  100. # Server password
  101. if [ -n "${serverpassword}" ]; then
  102. echo -e "\e[34mServer password:\t\e[0m${serverpassword}"
  103. fi
  104. # RCON password
  105. if [ -n "${rconpassword}" ]; then
  106. echo -e "\e[34mRCON password:\t\e[0m${rconpassword}"
  107. fi
  108. # Admin password
  109. if [ -n "${adminpassword}" ]; then
  110. echo -e "\e[34mAdmin password:\t\e[0m${adminpassword}"
  111. fi
  112. # Stats password (Quake Live)
  113. if [ -n "${statspassword}" ]; then
  114. echo -e "\e[34mStats password:\t\e[0m${statspassword}"
  115. fi
  116. # Slots
  117. if [ -n "${slots}" ]; then
  118. echo -e "\e[34mSlots:\t\e[0m${slots}"
  119. fi
  120. # Game mode
  121. if [ -n "${gamemode}" ]; then
  122. echo -e "\e[34mGame mode:\t\e[0m${gamemode}"
  123. fi
  124. # Game world
  125. if [ -n "${gameworld}" ]; then
  126. echo -e "\e[34mGame world:\t\e[0m${gameworld}"
  127. fi
  128. # Tick rate
  129. if [ -n "${tickrate}" ]; then
  130. echo -e "\e[34mTick rate:\t\e[0m${tickrate}"
  131. fi
  132. # Teamspeak dbplugin
  133. if [ -n "${dbplugin}" ]; then
  134. echo -e "\e[34mdbplugin:\t\e[0m${dbplugin}"
  135. fi
  136. # Online status
  137. if [ "${status}" == "0" ]; then
  138. echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m"
  139. else
  140. echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m"
  141. fi
  142. } | column -s $'\t' -t
  143. echo -e ""
  144. }
  145. fn_details_script(){
  146. #
  147. # qlserver Script Details
  148. # =====================================
  149. # Service name: ql-server
  150. # qlserver version: 150316
  151. # User: lgsm
  152. # Email alert: off
  153. # Update on start: off
  154. # Location: /home/lgsm/qlserver
  155. # Config file: /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
  156. echo -e "\e[92m${selfname} Script Details\e[0m"
  157. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  158. {
  159. # Service name
  160. echo -e "\e[34mService name:\t\e[0m${servicename}"
  161. # Script version
  162. if [ -n "${version}" ]; then
  163. echo -e "\e[34m${selfname} version:\t\e[0m${version}"
  164. fi
  165. # User
  166. echo -e "\e[34mUser:\t\e[0m$(whoami)"
  167. # GLIBC required
  168. if [ -n "${glibcrequired}" ]; then
  169. if [ "${glibcrequired}" == "NOT REQUIRED" ]; then
  170. :
  171. elif [ "${glibcrequired}" == "UNKNOWN" ]; then
  172. echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired}"
  173. elif [ "$(printf '%s\n'${glibcrequired}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibcrequired}" ]; then
  174. if [ "${glibcfix}" == "yes" ]; then
  175. echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired} \e[0m(\e[0;32mUsing GLIBC fix\e[0m)"
  176. else
  177. echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired} \e[0m(\e[0;31mGLIBC version too old\e[0m)"
  178. fi
  179. else
  180. echo -e "\e[34mGLIBC required:\t\e[0;32m${glibcrequired}\e[0m"
  181. fi
  182. fi
  183. # Email alert
  184. echo -e "\e[34mEmail alert:\t\e[0m${emailalert}"
  185. # Pushbullet alert
  186. echo -e "\e[34mPushbullet alert:\t\e[0m${pushbulletalert}"
  187. # Update on start
  188. echo -e "\e[34mUpdate on start:\t\e[0m${updateonstart}"
  189. # Script location
  190. echo -e "\e[34mLocation:\t\e[0m${rootdir}"
  191. # Config file location
  192. if [ -n "${servercfgfullpath}" ]; then
  193. if [ -f "${servercfgfullpath}" ]; then
  194. echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}"
  195. else
  196. echo -e "\e[34mConfig file:\t\e[0m\e[0;31m${servercfgfullpath}\e[0m (\e[0;31mFILE MISSING\e[0m)"
  197. fi
  198. fi
  199. # Network config file location (ARMA 3)
  200. if [ -n "${networkcfgfullpath}" ]; then
  201. echo -e "\e[34mNetwork config file:\t\e[0m${networkcfgfullpath}"
  202. fi
  203. } | column -s $'\t' -t
  204. }
  205. fn_details_backup(){
  206. #
  207. # Backups
  208. # =====================================
  209. # No. of backups: 1
  210. # Latest backup:
  211. # date: Fri May 6 18:34:19 UTC 2016
  212. # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz
  213. # size: 945M
  214. echo -e ""
  215. echo -e "\e[92mBackups\e[0m"
  216. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  217. if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
  218. echo -e "No Backups created"
  219. else
  220. {
  221. echo -e "\e[34mNo. of backups:\t\e[0m${backupcount}"
  222. echo -e "\e[34mLatest backup:\e[0m"
  223. echo -e "\e[34m date:\t\e[0m${lastbackupdate}"
  224. echo -e "\e[34m file:\t\e[0m${lastbackup}"
  225. echo -e "\e[34m size:\t\e[0m${lastbackupsize}"
  226. } | column -s $'\t' -t
  227. fi
  228. }
  229. fn_details_commandlineparms(){
  230. #
  231. # Command-line Parameters
  232. # =====================================
  233. # ./run_server_x86.sh +set net_strict 1
  234. echo -e ""
  235. echo -e "\e[92mCommand-line Parameters\e[0m"
  236. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  237. echo -e "${executable} ${parms}"
  238. }
  239. fn_details_ports(){
  240. # Ports
  241. # =====================================
  242. # Change ports by editing the parameters in:
  243. # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
  244. echo -e ""
  245. echo -e "\e[92mPorts\e[0m"
  246. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  247. echo -e "Change ports by editing the parameters in:"
  248. parmslocation="\e[0;31mUNKNOWN\e[0m"
  249. local ports_edit_array=( "avalanche" "dontstarve" "projectzomboid" "idtech3" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "Teamspeak 3" "7 Days To Die" )
  250. for port_edit in "${ports_edit_array[@]}"
  251. do
  252. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  253. parmslocation="${servercfgfullpath}"
  254. fi
  255. done
  256. local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4")
  257. for port_edit in "${ports_edit_array[@]}"
  258. do
  259. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  260. parmslocation="${selfname}"
  261. fi
  262. done
  263. echo -e "${parmslocation}"
  264. echo -e ""
  265. echo -e "Useful port diagnostic command:"
  266. }
  267. fn_details_statusbottom(){
  268. echo -e ""
  269. if [ "${status}" == "0" ]; then
  270. echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m"
  271. else
  272. echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m"
  273. fi
  274. echo -e ""
  275. }
  276. # Engine Specific details
  277. fn_details_avalanche(){
  278. echo -e "netstat -atunp | grep Jcmp-Server"
  279. echo -e ""
  280. {
  281. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  282. echo -e "> Game\tINBOUND\t${port}\tudp"
  283. } | column -s $'\t' -t
  284. }
  285. fn_details_dontstarve(){
  286. echo -e "netstat -atunp | grep dontstarve"
  287. echo -e ""
  288. {
  289. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  290. echo -e "> Game\tINBOUND\t${port}\tudp"
  291. } | column -s $'\t' -t
  292. }
  293. fn_details_projectzomboid(){
  294. echo -e "netstat -atunp | grep java"
  295. echo -e ""
  296. {
  297. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  298. echo -e "> Game\tINBOUND\t${port}\tudp"
  299. } | column -s $'\t' -t
  300. }
  301. fn_details_realvirtuality(){
  302. echo -e "netstat -atunp | grep arma3server"
  303. echo -e ""
  304. if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then
  305. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  306. echo -e ""
  307. fi
  308. {
  309. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  310. echo -e "> Game\tINBOUND\t${port}\tudp"
  311. echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
  312. echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
  313. } | column -s $'\t' -t
  314. }
  315. fn_details_idtech3(){
  316. echo -e "netstat -atunp | grep qzeroded"
  317. echo -e ""
  318. if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then
  319. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  320. echo -e ""
  321. fi
  322. {
  323. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  324. echo -e "> Game\tINBOUND\t${port}\tudp"
  325. echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
  326. echo -e "> Stats\tINBOUND\t${statsport}\tudp"
  327. } | column -s $'\t' -t
  328. }
  329. fn_details_seriousengine35(){
  330. echo -e "netstat -atunp | grep Sam3_Dedicate"
  331. echo -e ""
  332. {
  333. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  334. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp"
  335. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  336. } | column -s $'\t' -t
  337. }
  338. fn_details_source(){
  339. echo -e "netstat -atunp | grep srcds_linux"
  340. echo -e ""
  341. {
  342. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  343. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  344. if [ -n "${sourcetvport}" ]; then
  345. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
  346. fi
  347. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  348. } | column -s $'\t' -t
  349. }
  350. fn_details_spark(){
  351. echo -e "netstat -atunp | grep server_linux3"
  352. echo -e ""
  353. {
  354. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  355. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  356. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  357. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  358. } | column -s $'\t' -t
  359. echo -e ""
  360. echo -e "\e[92m${servername} WebAdmin\e[0m"
  361. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  362. {
  363. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html"
  364. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}"
  365. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  366. } | column -s $'\t' -t
  367. }
  368. fn_details_starbound(){
  369. echo -e "netstat -atunp | grep starbound"
  370. echo -e ""
  371. {
  372. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  373. echo -e "> Game\tINBOUND\t${port}\ttcp"
  374. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  375. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
  376. } | column -s $'\t' -t
  377. }
  378. fn_details_teamspeak3(){
  379. echo -e "netstat -atunp | grep ts3server"
  380. echo -e ""
  381. {
  382. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  383. echo -e "> Voice\tINBOUND\t${port}\tudp"
  384. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp"
  385. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
  386. } | column -s $'\t' -t
  387. }
  388. fn_details_teeworlds(){
  389. echo -e "netstat -atunp | grep teeworlds_srv"
  390. echo -e ""
  391. {
  392. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  393. echo -e "> Game\tINBOUND\t${port}\ttcp"
  394. } | column -s $'\t' -t
  395. }
  396. fn_details_terraria(){
  397. echo -e "netstat -atunp | grep TerrariaServer"
  398. echo -e ""
  399. {
  400. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  401. echo -e "> Game\tINBOUND\t${port}\ttcp"
  402. } | column -s $'\t' -t
  403. }
  404. fn_details_sdtd(){
  405. echo -e "netstat -atunp | grep 7DaysToDie"
  406. echo -e ""
  407. {
  408. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  409. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  410. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  411. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  412. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp"
  413. } | column -s $'\t' -t
  414. echo -e ""
  415. echo -e "\e[92m${servername} WebAdmin\e[0m"
  416. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  417. {
  418. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}"
  419. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}"
  420. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  421. } | column -s $'\t' -t
  422. echo -e ""
  423. echo -e "\e[92m${servername} Telnet\e[0m"
  424. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  425. {
  426. echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}"
  427. echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}"
  428. echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}"
  429. } | column -s $'\t' -t
  430. }
  431. fn_details_hurtworld(){
  432. echo -e "netstat -atunp | grep Hurtworld"
  433. echo -e ""
  434. {
  435. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  436. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  437. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  438. } | column -s $'\t' -t
  439. }
  440. fn_details_rust(){
  441. echo -e "netstat -atunp | grep Rust"
  442. echo -e ""
  443. {
  444. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  445. echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
  446. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  447. } | column -s $'\t' -t
  448. }
  449. fn_details_unreal(){
  450. echo -e "netstat -atunp | grep ucc-bin"
  451. echo -e ""
  452. {
  453. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  454. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  455. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  456. if [ "${engine}" == "unreal" ]; then
  457. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp"
  458. fi
  459. if [ "${engine}" != "unreal" ] && [ "${appid}" != "223250" ]; then
  460. echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}"
  461. fi
  462. if [ "${appid}" == "215360" ]; then
  463. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp"
  464. else
  465. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp"
  466. fi
  467. if [ "${appid}" ]; then
  468. if [ "${appid}" == "223250" ]; then
  469. echo -e "< Steam\tOUTBOUND\t20610\tudp"
  470. else
  471. echo -e "< Steam\tOUTBOUND\t20660\tudp"
  472. fi
  473. fi
  474. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  475. } | column -s $'\t' -t
  476. echo -e ""
  477. echo -e "\e[92m${servername} WebAdmin\e[0m"
  478. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  479. {
  480. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}"
  481. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}"
  482. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}"
  483. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  484. } | column -s $'\t' -t
  485. }
  486. fn_details_ark(){
  487. echo -e "netstat -atunp | grep ShooterGame"
  488. echo -e ""
  489. {
  490. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  491. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  492. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  493. } | column -s $'\t' -t
  494. }
  495. # Run checks and gathers details to display.
  496. check.sh
  497. info_config.sh
  498. info_distro.sh
  499. info_glibc.sh
  500. info_parms.sh
  501. fn_details_os
  502. fn_details_performance
  503. fn_details_disk
  504. fn_details_gameserver
  505. fn_details_script
  506. fn_details_backup
  507. # Some game servers do not have parms.
  508. if [ "${gamename}" != "Teamspeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
  509. fn_parms
  510. fn_details_commandlineparms
  511. fi
  512. fn_details_ports
  513. # Display details depending on game or engine.
  514. if [ "${engine}" == "avalanche" ]; then
  515. fn_details_avalanche
  516. elif [ "${engine}" == "dontstarve" ]; then
  517. fn_details_dontstarve
  518. elif [ "${engine}" == "projectzomboid" ]; then
  519. fn_details_projectzomboid
  520. elif [ "${engine}" == "idtech3" ]; then
  521. fn_details_idtech3
  522. elif [ "${engine}" == "realvirtuality" ]; then
  523. fn_details_realvirtuality
  524. elif [ "${engine}" == "seriousengine35" ]; then
  525. fn_details_seriousengine35
  526. elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
  527. fn_details_source
  528. elif [ "${engine}" == "spark" ]; then
  529. fn_details_spark
  530. elif [ "${engine}" == "starbound" ]; then
  531. fn_details_starbound
  532. elif [ "${engine}" == "teeworlds" ]; then
  533. fn_details_teeworlds
  534. elif [ "${engine}" == "terraria" ]; then
  535. fn_details_terraria
  536. elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
  537. fn_details_unreal
  538. elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
  539. fn_details_ark
  540. elif [ "${gamename}" == "Hurtworld" ]; then
  541. fn_details_hurtworld
  542. elif [ "${gamename}" == "7 Days To Die" ]; then
  543. fn_details_sdtd
  544. elif [ "${gamename}" == "Teamspeak 3" ]; then
  545. fn_details_teamspeak3
  546. elif [ "${gamename}" == "Rust" ]; then
  547. fn_details_rust
  548. else
  549. fn_print_error_nl "Unable to detect server engine."
  550. fi
  551. fn_details_statusbottom
  552. core_exit.sh