command_details.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. #!/bin/bash
  2. # LGSM command_details.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. lgsm_version="190616"
  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. # 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. # Update on start
  186. echo -e "\e[34mUpdate on start:\t\e[0m${updateonstart}"
  187. # Script location
  188. echo -e "\e[34mLocation:\t\e[0m${rootdir}"
  189. # Config file location
  190. if [ -n "${servercfgfullpath}" ]; then
  191. if [ -f "${servercfgfullpath}" ]; then
  192. echo -e "\e[34mConfig file:\t\e[0m${servercfgfullpath}"
  193. else
  194. echo -e "\e[34mConfig file:\t\e[0m\e[0;31m${servercfgfullpath}\e[0m (\e[0;31mFILE MISSING\e[0m)"
  195. fi
  196. fi
  197. # Network config file location (ARMA 3)
  198. if [ -n "${networkcfgfullpath}" ]; then
  199. echo -e "\e[34mNetwork config file:\t\e[0m${networkcfgfullpath}"
  200. fi
  201. } | column -s $'\t' -t
  202. }
  203. fn_details_backup(){
  204. #
  205. # Backups
  206. # =====================================
  207. # No. of backups: 1
  208. # Latest backup:
  209. # date: Fri May 6 18:34:19 UTC 2016
  210. # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz
  211. # size: 945M
  212. echo -e ""
  213. echo -e "\e[92mBackups\e[0m"
  214. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  215. if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
  216. echo -e "No Backups created"
  217. else
  218. {
  219. echo -e "\e[34mNo. of backups:\t\e[0m${backupcount}"
  220. echo -e "\e[34mLatest backup:\e[0m"
  221. echo -e "\e[34m date:\t\e[0m${lastbackupdate}"
  222. echo -e "\e[34m file:\t\e[0m${lastbackup}"
  223. echo -e "\e[34m size:\t\e[0m${lastbackupsize}"
  224. } | column -s $'\t' -t
  225. fi
  226. }
  227. fn_details_commandlineparms(){
  228. #
  229. # Command-line Parameters
  230. # =====================================
  231. # ./run_server_x86.sh +set net_strict 1
  232. echo -e ""
  233. echo -e "\e[92mCommand-line Parameters\e[0m"
  234. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  235. echo -e "${executable} ${parms}"
  236. }
  237. fn_details_ports(){
  238. # Ports
  239. # =====================================
  240. # Change ports by editing the parameters in:
  241. # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
  242. echo -e ""
  243. echo -e "\e[92mPorts\e[0m"
  244. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  245. echo -e "Change ports by editing the parameters in:"
  246. parmslocation="\e[0;31mUNKNOWN\e[0m"
  247. local ports_edit_array=( "avalanche" "dontstarve" "projectzomboid" "idtech3" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "Teamspeak 3" "7 Days To Die" )
  248. for port_edit in "${ports_edit_array[@]}"
  249. do
  250. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  251. parmslocation="${servercfgfullpath}"
  252. fi
  253. done
  254. local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4")
  255. for port_edit in "${ports_edit_array[@]}"
  256. do
  257. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  258. parmslocation="${selfname}"
  259. fi
  260. done
  261. echo -e "${parmslocation}"
  262. echo -e ""
  263. echo -e "Useful port diagnostic command:"
  264. }
  265. fn_details_statusbottom(){
  266. echo -e ""
  267. if [ "${status}" == "0" ]; then
  268. echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m"
  269. else
  270. echo -e "\e[34mStatus:\t\e[0;32mONLINE\e[0m"
  271. fi
  272. echo -e ""
  273. }
  274. # Engine Specific details
  275. fn_details_avalanche(){
  276. echo -e "netstat -atunp | grep Jcmp-Server"
  277. echo -e ""
  278. {
  279. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  280. echo -e "> Game\tINBOUND\t${port}\tudp"
  281. } | column -s $'\t' -t
  282. }
  283. fn_details_dontstarve(){
  284. echo -e "netstat -atunp | grep dontstarve"
  285. echo -e ""
  286. {
  287. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  288. echo -e "> Game\tINBOUND\t${port}\tudp"
  289. } | column -s $'\t' -t
  290. }
  291. fn_details_projectzomboid(){
  292. echo -e "netstat -atunp | grep java"
  293. echo -e ""
  294. {
  295. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  296. echo -e "> Game\tINBOUND\t${port}\tudp"
  297. } | column -s $'\t' -t
  298. }
  299. fn_details_realvirtuality(){
  300. echo -e "netstat -atunp | grep arma3server"
  301. echo -e ""
  302. if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then
  303. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  304. echo -e ""
  305. fi
  306. {
  307. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  308. echo -e "> Game\tINBOUND\t${port}\tudp"
  309. echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
  310. echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
  311. } | column -s $'\t' -t
  312. }
  313. fn_details_idtech3(){
  314. echo -e "netstat -atunp | grep qzeroded"
  315. echo -e ""
  316. if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then
  317. echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
  318. echo -e ""
  319. fi
  320. {
  321. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  322. echo -e "> Game\tINBOUND\t${port}\tudp"
  323. echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
  324. echo -e "> Stats\tINBOUND\t${statsport}\tudp"
  325. } | column -s $'\t' -t
  326. }
  327. fn_details_seriousengine35(){
  328. echo -e "netstat -atunp | grep Sam3_Dedicate"
  329. echo -e ""
  330. {
  331. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  332. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp"
  333. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  334. } | column -s $'\t' -t
  335. }
  336. fn_details_source(){
  337. echo -e "netstat -atunp | grep srcds_linux"
  338. echo -e ""
  339. {
  340. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  341. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  342. if [ -n "${sourcetvport}" ]; then
  343. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
  344. fi
  345. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  346. } | column -s $'\t' -t
  347. }
  348. fn_details_spark(){
  349. echo -e "netstat -atunp | grep server_linux3"
  350. echo -e ""
  351. {
  352. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  353. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  354. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  355. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  356. } | column -s $'\t' -t
  357. echo -e ""
  358. echo -e "\e[92m${servername} WebAdmin\e[0m"
  359. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  360. {
  361. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}/index.html"
  362. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}"
  363. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  364. } | column -s $'\t' -t
  365. }
  366. fn_details_starbound(){
  367. echo -e "netstat -atunp | grep starbound"
  368. echo -e ""
  369. {
  370. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  371. echo -e "> Game\tINBOUND\t${port}\ttcp"
  372. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  373. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
  374. } | column -s $'\t' -t
  375. }
  376. fn_details_teamspeak3(){
  377. echo -e "netstat -atunp | grep ts3server"
  378. echo -e ""
  379. {
  380. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  381. echo -e "> Voice\tINBOUND\t${port}\tudp"
  382. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp"
  383. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
  384. } | column -s $'\t' -t
  385. }
  386. fn_details_teeworlds(){
  387. echo -e "netstat -atunp | grep teeworlds_srv"
  388. echo -e ""
  389. {
  390. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  391. echo -e "> Game\tINBOUND\t${port}\ttcp"
  392. } | column -s $'\t' -t
  393. }
  394. fn_details_terraria(){
  395. echo -e "netstat -atunp | grep TerrariaServer"
  396. echo -e ""
  397. {
  398. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  399. echo -e "> Game\tINBOUND\t${port}\ttcp"
  400. } | column -s $'\t' -t
  401. }
  402. fn_details_sdtd(){
  403. echo -e "netstat -atunp | grep 7DaysToDie"
  404. echo -e ""
  405. {
  406. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  407. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  408. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  409. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  410. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp"
  411. } | column -s $'\t' -t
  412. echo -e ""
  413. echo -e "\e[92m${servername} WebAdmin\e[0m"
  414. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  415. {
  416. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}"
  417. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}"
  418. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  419. } | column -s $'\t' -t
  420. echo -e ""
  421. echo -e "\e[92m${servername} Telnet\e[0m"
  422. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  423. {
  424. echo -e "\e[34mTelnet enabled:\t\e[0m${telnetenabled}"
  425. echo -e "\e[34mTelnet address:\t\e[0m${ip} ${telnetport}"
  426. echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}"
  427. } | column -s $'\t' -t
  428. }
  429. fn_details_hurtworld(){
  430. echo -e "netstat -atunp | grep Hurtworld"
  431. echo -e ""
  432. {
  433. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  434. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  435. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  436. } | column -s $'\t' -t
  437. }
  438. fn_details_rust(){
  439. echo -e "netstat -atunp | grep Rust"
  440. echo -e ""
  441. {
  442. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  443. echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
  444. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  445. } | column -s $'\t' -t
  446. }
  447. fn_details_unreal(){
  448. echo -e "netstat -atunp | grep ucc-bin"
  449. echo -e ""
  450. {
  451. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  452. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  453. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  454. if [ "${engine}" == "unreal" ]; then
  455. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp"
  456. fi
  457. if [ "${engine}" != "unreal" ] && [ "${appid}" != "223250" ]; then
  458. echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}"
  459. fi
  460. if [ "${appid}" == "215360" ]; then
  461. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp"
  462. else
  463. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp"
  464. fi
  465. if [ "${appid}" ]; then
  466. if [ "${appid}" == "223250" ]; then
  467. echo -e "< Steam\tOUTBOUND\t20610\tudp"
  468. else
  469. echo -e "< Steam\tOUTBOUND\t20660\tudp"
  470. fi
  471. fi
  472. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  473. } | column -s $'\t' -t
  474. echo -e ""
  475. echo -e "\e[92m${servername} WebAdmin\e[0m"
  476. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  477. {
  478. echo -e "\e[34mWebAdmin enabled:\t\e[0m${webadminenabled}"
  479. echo -e "\e[34mWebAdmin url:\t\e[0mhttp://${ip}:${webadminport}"
  480. echo -e "\e[34mWebAdmin username:\t\e[0m${webadminuser}"
  481. echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
  482. } | column -s $'\t' -t
  483. }
  484. fn_details_ark(){
  485. echo -e "netstat -atunp | grep ShooterGame"
  486. echo -e ""
  487. {
  488. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  489. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  490. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  491. } | column -s $'\t' -t
  492. }
  493. # Run checks and gathers details to display.
  494. check.sh
  495. info_config.sh
  496. info_distro.sh
  497. info_glibc.sh
  498. info_parms.sh
  499. fn_details_os
  500. fn_details_performance
  501. fn_details_disk
  502. fn_details_gameserver
  503. fn_details_script
  504. fn_details_backup
  505. # Some game servers do not have parms.
  506. if [ "${gamename}" != "Teamspeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
  507. fn_parms
  508. fn_details_commandlineparms
  509. fi
  510. fn_details_ports
  511. # Display details depending on game or engine.
  512. if [ "${engine}" == "avalanche" ]; then
  513. fn_details_avalanche
  514. elif [ "${engine}" == "dontstarve" ]; then
  515. fn_details_dontstarve
  516. elif [ "${engine}" == "projectzomboid" ]; then
  517. fn_details_projectzomboid
  518. elif [ "${engine}" == "idtech3" ]; then
  519. fn_details_idtech3
  520. elif [ "${engine}" == "realvirtuality" ]; then
  521. fn_details_realvirtuality
  522. elif [ "${engine}" == "seriousengine35" ]; then
  523. fn_details_seriousengine35
  524. elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
  525. fn_details_source
  526. elif [ "${engine}" == "spark" ]; then
  527. fn_details_spark
  528. elif [ "${engine}" == "starbound" ]; then
  529. fn_details_starbound
  530. elif [ "${engine}" == "teeworlds" ]; then
  531. fn_details_teeworlds
  532. elif [ "${engine}" == "terraria" ]; then
  533. fn_details_terraria
  534. elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
  535. fn_details_unreal
  536. elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
  537. fn_details_ark
  538. elif [ "${gamename}" == "Hurtworld" ]; then
  539. fn_details_hurtworld
  540. elif [ "${gamename}" == "7 Days To Die" ]; then
  541. fn_details_sdtd
  542. elif [ "${gamename}" == "Teamspeak 3" ]; then
  543. fn_details_teamspeak3
  544. elif [ "${gamename}" == "Rust" ]; then
  545. fn_details_rust
  546. else
  547. fn_print_error_nl "Unable to detect server engine."
  548. fi
  549. fn_details_statusbottom
  550. core_exit.sh