command_details.sh 17 KB

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