command_details.sh 17 KB

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