command_details.sh 17 KB

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