4
0

command_details.sh 18 KB

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