info_messages.sh 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705
  1. #!/bin/bash
  2. # LinuxGSM info_messages.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Defines server info messages for details and alerts.
  7. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. # Separator is different for details.
  9. fn_messages_separator(){
  10. if [ "${commandname}" == "DETAILS" ]; then
  11. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  12. else
  13. echo -e "================================="
  14. fi
  15. }
  16. # Removes the passwords form all but details.
  17. fn_info_message_password_strip(){
  18. if [ "${commandname}" != "DETAILS" ]; then
  19. if [ "${serverpassword}" ]; then
  20. serverpassword="********"
  21. fi
  22. if [ "${rconpassword}" ]; then
  23. rconpassword="********"
  24. fi
  25. if [ "${adminpassword}" ]; then
  26. adminpassword="********"
  27. fi
  28. if [ "${statspassword}" ]; then
  29. statspassword="********"
  30. fi
  31. if [ "${webadminpass}" ]; then
  32. webadminpass="********"
  33. fi
  34. if [ "${telnetpass}" ]; then
  35. telnetpass="********"
  36. fi
  37. if [ "${wsapikey}" ]; then
  38. wsapikey="********"
  39. fi
  40. if [ "${gslt}" ]; then
  41. gslt="********"
  42. fi
  43. fi
  44. }
  45. # Alert Summary
  46. # used with alertlog
  47. fn_info_message_head(){
  48. echo -e ""
  49. echo -e "${lightyellow}Alert Summary${default}"
  50. fn_messages_separator
  51. echo -e "Message"
  52. echo -e "${alertbody}"
  53. echo -e ""
  54. echo -e "Game"
  55. echo -e "${gamename}"
  56. echo -e ""
  57. echo -e "Server name"
  58. echo -e "${servername}"
  59. echo -e ""
  60. echo -e "Hostname"
  61. echo -e "${HOSTNAME}"
  62. echo -e ""
  63. echo -e "Server IP"
  64. echo -e "${ip}:${port}"
  65. }
  66. fn_info_message_distro(){
  67. #
  68. # Distro Details
  69. # =================================
  70. # Date: Sun 21 Feb 2021 09:22:53 AM UTC
  71. # Distro: Ubuntu 20.04.2 LTS
  72. # Arch: x86_64
  73. # Kernel: 5.4.0-65-generic
  74. # Hostname: server
  75. # Uptime: 16d, 5h, 18m
  76. # tmux: tmux 3.0a
  77. # glibc: 2.31
  78. echo -e ""
  79. echo -e "${lightyellow}Distro Details${default}"
  80. fn_messages_separator
  81. {
  82. echo -e "${lightblue}Date:\t${default}${date}"
  83. echo -e "${lightblue}Distro:\t${default}${distroname}"
  84. echo -e "${lightblue}Arch:\t${default}${arch}"
  85. echo -e "${lightblue}Kernel:\t${default}${kernel}"
  86. echo -e "${lightblue}Hostname:\t${default}${HOSTNAME}"
  87. echo -e "${lightblue}Uptime:\t${default}${days}d, ${hours}h, ${minutes}m"
  88. echo -e "${lightblue}tmux:\t${default}${tmuxv}"
  89. echo -e "${lightblue}glibc:\t${default}${glibcversion}"
  90. } | column -s $'\t' -t
  91. }
  92. fn_info_message_server_resource(){
  93. #
  94. # Server Resource
  95. # =================================
  96. # CPU
  97. # Model: AMD EPYC 7601 32-Core Processor
  98. # Cores: 2
  99. # Frequency: 2199.994MHz
  100. # Avg Load: 0.01, 0.05, 0.18
  101. #
  102. # Memory
  103. # Mem: total used free cached available
  104. # Physical: 3.9GB 350MB 3.3GB 3.2GB 3.3GB
  105. # Swap: 512MB 55MB 458MB
  106. #
  107. # Storage
  108. # Filesystem: /dev/sda
  109. # Total: 79G
  110. # Used: 73G
  111. # Available: 1.4G
  112. #
  113. # Network
  114. # IP: 0.0.0.0
  115. # Internet IP: 176.58.124.96
  116. echo -e ""
  117. echo -e "${lightyellow}Server Resource${default}"
  118. fn_messages_separator
  119. {
  120. echo -e "${lightyellow}CPU\t${default}"
  121. echo -e "${lightblue}Model:\t${default}${cpumodel}"
  122. echo -e "${lightblue}Cores:\t${default}${cpucores}"
  123. echo -e "${lightblue}Frequency:\t${default}${cpufreqency}MHz"
  124. echo -e "${lightblue}Avg Load:\t${default}${load}"
  125. } | column -s $'\t' -t
  126. echo -e ""
  127. {
  128. echo -e "${lightyellow}Memory\t${default}"
  129. echo -e "${lightblue}Mem:\t${lightblue}total\tused\tfree\tcached\tavailable${default}"
  130. echo -e "${lightblue}Physical:\t${default}${physmemtotal}\t${physmemused}\t${physmemfree}\t${physmemcached}\t${physmemavailable}${default}"
  131. echo -e "${lightblue}Swap:\t${default}${swaptotal}\t${swapused}\t${swapfree}${default}"
  132. } | column -s $'\t' -t
  133. echo -e ""
  134. {
  135. echo -e "${lightyellow}Storage${default}"
  136. echo -e "${lightblue}Filesystem:\t${default}${filesystem}"
  137. echo -e "${lightblue}Total:\t\t${default}${totalspace}"
  138. echo -e "${lightblue}Used:\t\t${default}${usedspace}"
  139. echo -e "${lightblue}Available:\t${default}${availspace}"
  140. } | column -s $'\t' -t
  141. echo -e ""
  142. {
  143. echo -e "${lightyellow}Network${default}"
  144. if [ -n "${netint}" ]; then
  145. echo -e "${lightblue}Interface:\t${default}${netint}"
  146. fi
  147. if [ -n "${netlink}" ]; then
  148. echo -e "${lightblue}Link Speed:\t${default}${netlink}"
  149. fi
  150. echo -e "${lightblue}IP:\t${default}${ip}"
  151. if [ "${ip}" != "${extip}" ]; then
  152. echo -e "${lightblue}Internet IP:\t${default}${extip}"
  153. fi
  154. } | column -s $'\t' -t
  155. }
  156. fn_info_message_gameserver_resource(){
  157. #
  158. # Game Server Resource Usage
  159. # =================================
  160. # CPU Used: 1.1%
  161. # Mem Used: 4.8% 189MB
  162. #
  163. # Storage
  164. # Total: 241M
  165. # Serverfiles: 240M
  166. # Backups: 24K
  167. echo -e ""
  168. echo -e "${lightyellow}Game Server Resource Usage${default}"
  169. fn_messages_separator
  170. {
  171. if [ "${status}" != "0" ]&&[ -v status ]; then
  172. if [ -n "${cpuused}" ]; then
  173. echo -e "${lightblue}CPU Used:\t${default}${cpuused}%${default}"
  174. else
  175. echo -e "${lightblue}CPU Used:\t${red}unknown${default}"
  176. fi
  177. if [ -n "${memused}" ]; then
  178. echo -e "${lightblue}Mem Used:\t${default}${pmemused}%\t${memused}MB${default}"
  179. else
  180. echo -e "${lightblue}Mem Used:\t${default}${pmemused}\t${red}unknown${default}"
  181. fi
  182. else
  183. echo -e "${lightblue}CPU Used:\t${default}0%${default}"
  184. echo -e "${lightblue}Mem Used:\t${default}0%\t0MB${default}"
  185. fi
  186. } | column -s $'\t' -t
  187. echo -e ""
  188. {
  189. echo -e "${lightyellow}Storage${default}"
  190. echo -e "${lightblue}Total:\t${default}${rootdirdu}"
  191. echo -e "${lightblue}Serverfiles:\t${default}${serverfilesdu}"
  192. if [ -d "${backupdir}" ]; then
  193. echo -e "${lightblue}Backups:\t${default}${backupdirdu}"
  194. fi
  195. } | column -s $'\t' -t
  196. }
  197. fn_info_message_gameserver(){
  198. #
  199. # Counter-Strike: Global Offensive Server Details
  200. # =================================
  201. # Server name: LinuxGSM
  202. # Server IP: 0.0.0.0:27015
  203. # Internet IP: 176.48.124.96:34197
  204. # Server password: NOT SET
  205. # RCON password: adminF54CC0VR
  206. # Players: 0/16
  207. # Current map: de_mirage
  208. # Default map: de_mirage
  209. # Game type: 0
  210. # Game mode: 0
  211. # Tick rate: 64
  212. # Master Server: listed
  213. # Status: STARTED
  214. echo -e ""
  215. echo -e "${lightgreen}${gamename} Server Details${default}"
  216. fn_info_message_password_strip
  217. fn_messages_separator
  218. {
  219. # Server name
  220. if [ -n "${gdname}" ]; then
  221. echo -e "${lightblue}Server name:\t${default}${gdname}"
  222. elif [ -n "${servername}" ]; then
  223. echo -e "${lightblue}Server name:\t${default}${servername}"
  224. fi
  225. # Server description
  226. if [ -n "${serverdescription}" ]; then
  227. echo -e "${lightblue}Server Description:\t${default}${serverdescription}"
  228. fi
  229. # Appid
  230. if [ -n "${appid}" ]; then
  231. echo -e "${lightblue}App ID:\t${default}${appid}"
  232. fi
  233. # Branch
  234. if [ -n "${branch}" ]; then
  235. echo -e "${lightblue}Branch:\t${default}${branch}"
  236. fi
  237. # Beta Password
  238. if [ -n "${betapassword}" ]; then
  239. echo -e "${lightblue}Beta Password:\t${default}${betapassword}"
  240. fi
  241. # Server ip
  242. echo -e "${lightblue}Server IP:\t${default}${ip}:${port}"
  243. # Internet ip
  244. if [ -n "${extip}" ]; then
  245. if [ "${ip}" != "${extip}" ]; then
  246. echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}"
  247. fi
  248. fi
  249. # Display ip
  250. if [ -n "${displayip}" ]; then
  251. echo -e "${lightblue}Display IP:\t${default}${displayip}:${port}"
  252. fi
  253. # Server password
  254. if [ -n "${serverpassword}" ]; then
  255. echo -e "${lightblue}Server password:\t${default}${serverpassword}"
  256. fi
  257. # Query enabled (Starbound)
  258. if [ -n "${queryenabled}" ]; then
  259. echo -e "${lightblue}Query enabled:\t${default}${queryenabled}"
  260. fi
  261. # RCON enabled (Starbound)
  262. if [ -n "${rconenabled}" ]; then
  263. echo -e "${lightblue}RCON enabled:\t${default}${rconenabled}"
  264. fi
  265. # RCON password
  266. if [ -n "${rconpassword}" ]; then
  267. echo -e "${lightblue}RCON password:\t${default}${rconpassword}"
  268. fi
  269. # RCON web (Rust)
  270. if [ -n "${rconweb}" ]; then
  271. echo -e "${lightblue}RCON web:\t${default}${rconweb}"
  272. fi
  273. # Admin password
  274. if [ -n "${adminpassword}" ]; then
  275. echo -e "${lightblue}Admin password:\t${default}${adminpassword}"
  276. fi
  277. # Stats password (Quake Live)
  278. if [ -n "${statspassword}" ]; then
  279. echo -e "${lightblue}Stats password:\t${default}${statspassword}"
  280. fi
  281. # Players
  282. if [ "${querystatus}" != "0" ]; then
  283. if [ -n "${maxplayers}" ]; then
  284. echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}"
  285. fi
  286. else
  287. if [ -n "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then
  288. echo -e "${lightblue}Players:\t${default}${gdplayers}/${gdmaxplayers}"
  289. elif [ -n "${gdplayers}" ]&&[ -n "${maxplayers}" ]; then
  290. echo -e "${lightblue}Players:\t${default}${gdplayers}/${maxplayers}"
  291. elif [ -z "${gdplayers}" ]&&[ -n "${gdmaxplayers}" ]; then
  292. echo -e "${lightblue}Players:\t${default}0/${gdmaxplayers}"
  293. elif [ -n "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]; then
  294. echo -e "${lightblue}Players:\t${default}${gdplayers}/∞"
  295. elif [ -z "${gdplayers}" ]&&[ -z "${gdmaxplayers}" ]&&[ -n "${maxplayers}" ]; then
  296. echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}"
  297. fi
  298. fi
  299. # Bots
  300. if [ -n "${gdbots}" ]; then
  301. echo -e "${lightblue}Bots:\t${default}${gdbots}"
  302. fi
  303. # Current map
  304. if [ -n "${gdmap}" ]; then
  305. echo -e "${lightblue}Current map:\t${default}${gdmap}"
  306. fi
  307. # Default map
  308. if [ -n "${defaultmap}" ]; then
  309. echo -e "${lightblue}Default map:\t${default}${defaultmap}"
  310. fi
  311. if [ -n "${defaultscenario}" ]; then
  312. # Current scenario (Insurgency: Sandstorm)
  313. if [ -n "${gdgamemode}" ]; then
  314. echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}"
  315. fi
  316. else
  317. # Current game mode
  318. if [ -n "${gdgamemode}" ]; then
  319. echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}"
  320. fi
  321. fi
  322. # Default scenario
  323. if [ -n "${defaultscenario}" ]; then
  324. echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}"
  325. fi
  326. # Game type
  327. if [ -n "${gametype}" ]; then
  328. echo -e "${lightblue}Game type:\t${default}${gametype}"
  329. fi
  330. # Game mode
  331. if [ -n "${gamemode}" ]; then
  332. echo -e "${lightblue}Game mode:\t${default}${gamemode}"
  333. fi
  334. # Game world
  335. if [ -n "${gameworld}" ]; then
  336. echo -e "${lightblue}Game world:\t${default}${gameworld}"
  337. fi
  338. # Tick rate
  339. if [ -n "${tickrate}" ]; then
  340. echo -e "${lightblue}Tick rate:\t${default}${tickrate}"
  341. fi
  342. # Sharding (Don't Starve Together)
  343. if [ -n "${sharding}" ]; then
  344. echo -e "${lightblue}Sharding:\t${default}${sharding}"
  345. fi
  346. # Master (Don't Starve Together)
  347. if [ -n "${master}" ]; then
  348. echo -e "${lightblue}Master:\t${default}${master}"
  349. fi
  350. # Shard (Don't Starve Together)
  351. if [ -n "${shard}" ]; then
  352. echo -e "${lightblue}Shard:\t${default}${shard}"
  353. fi
  354. # Cluster (Don't Starve Together)
  355. if [ -n "${cluster}" ]; then
  356. echo -e "${lightblue}Cluster:\t${default}${cluster}"
  357. fi
  358. # Cave (Don't Starve Together)
  359. if [ -n "${cave}" ]; then
  360. echo -e "${lightblue}Cave:\t${default}${cave}"
  361. fi
  362. # Creativemode (Hurtworld)
  363. if [ -n "${creativemode}" ]; then
  364. echo -e "${lightblue}Creativemode:\t${default}${creativemode}"
  365. fi
  366. # TeamSpeak dbplugin
  367. if [ -n "${dbplugin}" ]; then
  368. echo -e "${lightblue}dbplugin:\t${default}${dbplugin}"
  369. fi
  370. # ASE (Multi Theft Auto)
  371. if [ -n "${ase}" ]; then
  372. echo -e "${lightblue}ASE:\t${default}${ase}"
  373. fi
  374. # Save interval (Rust)
  375. if [ -n "${saveinterval}" ]; then
  376. echo -e "${lightblue}Save interval:\t${default}${saveinterval}s"
  377. fi
  378. # Seed (Rust)
  379. if [ -n "${seed}" ]; then
  380. echo -e "${lightblue}Seed:\t${default}${seed}"
  381. fi
  382. # Salt (Rust)
  383. if [ -n "${salt}" ]; then
  384. echo -e "${lightblue}Salt:\t${default}${salt}"
  385. fi
  386. # World Size (Rust)
  387. if [ -n "${worldsize}" ]; then
  388. echo -e "${lightblue}World size:\t${default}${worldsize}m"
  389. fi
  390. # Random map rotation mode (Squad and Post Scriptum)
  391. if [ -n "${randommap}" ]; then
  392. echo -e "${lightblue}Map rotation:\t${default}${randommap}"
  393. fi
  394. # Server Version (Jedi Knight II: Jedi Outcast)
  395. if [ -n "${serverversion}" ]; then
  396. echo -e "${lightblue}Server Version:\t${default}${serverversion}"
  397. fi
  398. # authentication token (Factorio)
  399. if [ -n "${authtoken}" ]; then
  400. echo -e "${lightblue}Auth Token:\t${default}${authtoken}"
  401. fi
  402. # savegameinterval (Factorio)
  403. if [ -n "${savegameinterval}" ]; then
  404. echo -e "${lightblue}Savegame Interval:\t${default}${savegameinterval}"
  405. fi
  406. # versioncount (Factorio)
  407. if [ -n "${versioncount}" ]; then
  408. echo -e "${lightblue}Version Count:\t${default}${versioncount}"
  409. fi
  410. # Listed on Master server
  411. if [ -n "${displaymasterserver}" ]; then
  412. if [ "${displaymasterserver}" == "true" ]; then
  413. echo -e "${lightblue}Master server:\t${green}listed${default}"
  414. else
  415. echo -e "${lightblue}Master server:\t${red}not listed${default}"
  416. fi
  417. fi
  418. # Game server status
  419. if [ "${status}" == "0" ]; then
  420. echo -e "${lightblue}Status:\t${red}STOPPED${default}"
  421. else
  422. echo -e "${lightblue}Status:\t${green}STARTED${default}"
  423. fi
  424. } | column -s $'\t' -t
  425. echo -e ""
  426. }
  427. fn_info_message_script(){
  428. # csgoserver Script Details
  429. # =================================
  430. # Script name: csgoserver
  431. # LinuxGSM version: v21.1.3
  432. # glibc required: 2.18
  433. # Discord alert: off
  434. # Email alert: off
  435. # IFTTT alert: off
  436. # Mailgun (email) alert: off
  437. # Pushbullet alert: off
  438. # Pushover alert: off
  439. # Rocketchat alert: off
  440. # Slack alert: off
  441. # Telegram alert: off
  442. # Update on start: off
  443. # User: lgsm
  444. # Location: /home/lgsm/csgoserver
  445. # Config file: /home/lgsm/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg
  446. echo -e "${lightgreen}${selfname} Script Details${default}"
  447. fn_messages_separator
  448. {
  449. # Script name
  450. echo -e "${lightblue}Script name:\t${default}${selfname}"
  451. # LinuxGSM version
  452. if [ -n "${version}" ]; then
  453. echo -e "${lightblue}LinuxGSM version:\t${default}${version}"
  454. fi
  455. # glibc required
  456. if [ -n "${glibc}" ]; then
  457. if [ "${glibc}" == "null" ]; then
  458. # Glibc is not required.
  459. :
  460. elif [ -z "${glibc}" ]; then
  461. echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}"
  462. elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then
  463. echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})"
  464. else
  465. echo -e "${lightblue}glibc required:\t${green}${glibc}${default}"
  466. fi
  467. fi
  468. # Discord alert
  469. echo -e "${lightblue}Discord alert:\t${default}${discordalert}"
  470. # Email alert
  471. echo -e "${lightblue}Email alert:\t${default}${emailalert}"
  472. # IFTTT alert
  473. echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}"
  474. # Mailgun alert
  475. echo -e "${lightblue}Mailgun (email) alert:\t${default}${mailgunalert}"
  476. # Pushbullet alert
  477. echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}"
  478. # Pushover alert
  479. echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}"
  480. # Rocketchat alert
  481. echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}"
  482. # Slack alert
  483. echo -e "${lightblue}Slack alert:\t${default}${slackalert}"
  484. # Telegram alert
  485. echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}"
  486. # Update on start
  487. if [ -n "${updateonstart}" ]; then
  488. echo -e "${lightblue}Update on start:\t${default}${updateonstart}"
  489. fi
  490. # User
  491. echo -e "${lightblue}User:\t${default}$(whoami)"
  492. # Script location
  493. echo -e "${lightblue}Location:\t${default}${rootdir}"
  494. # Config file location
  495. if [ -n "${servercfgfullpath}" ]; then
  496. if [ -f "${servercfgfullpath}" ]; then
  497. echo -e "${lightblue}Config file:\t${default}${servercfgfullpath}"
  498. elif [ -d "${servercfgfullpath}" ]; then
  499. echo -e "${lightblue}Config dir:\t${default}${servercfgfullpath}"
  500. else
  501. echo -e "${lightblue}Config file:\t${default}${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})"
  502. fi
  503. fi
  504. # Network config file location (ARMA 3)
  505. if [ -n "${networkcfgfullpath}" ]; then
  506. echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}"
  507. fi
  508. } | column -s $'\t' -t
  509. }
  510. fn_info_message_backup(){
  511. #
  512. # Backups
  513. # =================================
  514. # No. of backups: 1
  515. # Latest backup:
  516. # date: Fri May 6 18:34:19 UTC 2016
  517. # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz
  518. # size: 945M
  519. echo -e ""
  520. echo -e "${lightgreen}Backups${default}"
  521. fn_messages_separator
  522. if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
  523. echo -e "No Backups created"
  524. else
  525. {
  526. echo -e "${lightblue}No. of backups:\t${default}${backupcount}"
  527. echo -e "${lightblue}Latest backup:${default}"
  528. if [ "${lastbackupdaysago}" == "0" ]; then
  529. echo -e "${lightblue} date:\t${default}${lastbackupdate} (less than 1 day ago)"
  530. elif [ "${lastbackupdaysago}" == "1" ]; then
  531. echo -e "${lightblue} date:\t${default}${lastbackupdate} (1 day ago)"
  532. else
  533. echo -e "${lightblue} date:\t${default}${lastbackupdate} (${lastbackupdaysago} days ago)"
  534. fi
  535. echo -e "${lightblue} file:\t${default}${lastbackup}"
  536. echo -e "${lightblue} size:\t${default}${lastbackupsize}"
  537. } | column -s $'\t' -t
  538. fi
  539. }
  540. fn_info_message_commandlineparms(){
  541. #
  542. # Command-line Parameters
  543. # =================================
  544. # ./run_server_x86.sh +set net_strict 1
  545. echo -e ""
  546. echo -e "${lightgreen}Command-line Parameters${default}"
  547. fn_info_message_password_strip
  548. fn_messages_separator
  549. if [ "${serverpassword}" == "NOT SET" ]; then
  550. unset serverpassword
  551. fi
  552. fn_reload_startparameters
  553. echo -e "${preexecutable} ${executable} ${startparameters}"
  554. }
  555. fn_info_message_ports(){
  556. #
  557. # Ports
  558. # =================================
  559. # Change ports by editing the parameters in:
  560. # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
  561. echo -e ""
  562. echo -e "${lightgreen}Ports${default}"
  563. fn_messages_separator
  564. echo -e "${lightblue}Change ports by editing the parameters in:${default}"
  565. startparameterslocation="${red}UNKNOWN${default}"
  566. # engines/games that require editing in the config file.
  567. local ports_edit_array=( "avalanche2.0" "avalanche3.0" "Ballistic Overkill" "Barotrauma" "dontstarve" "Eco" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "Minecraft Bedrock" "Project Cars" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "Stationeers" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" "Vintage Story" "wurm")
  568. for port_edit in "${ports_edit_array[@]}"; do
  569. if [ "${shortname}" == "ut3" ]; then
  570. startparameterslocation="${servercfgdir}/UTWeb.ini"
  571. elif [ "${shortname}" == "kf2" ]; then
  572. startparameterslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini"
  573. elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  574. startparameterslocation="${servercfgfullpath}"
  575. fi
  576. done
  577. # engines/games that require editing the start parameters.
  578. local ports_edit_array=( "Avorion" "col" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "scpsl" "scpslsm" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" "vh" )
  579. for port_edit in "${ports_edit_array[@]}"; do
  580. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then
  581. startparameterslocation="${configdirserver}"
  582. fi
  583. done
  584. echo -e "${startparameterslocation}"
  585. echo -e ""
  586. echo -e "${lightblue}Useful port diagnostic command:${default}"
  587. }
  588. fn_info_message_statusbottom(){
  589. echo -e ""
  590. if [ "${status}" == "0" ]; then
  591. echo -e "${lightblue}Status:\t${red}STOPPED${default}"
  592. else
  593. echo -e "${lightblue}Status:\t${green}STARTED${default}"
  594. fi
  595. echo -e ""
  596. }
  597. fn_info_logs(){
  598. echo -e ""
  599. echo -e "${selfname} Logs"
  600. echo -e "================================="
  601. if [ -n "${lgsmlog}" ]; then
  602. echo -e "\nScript log\n==================="
  603. if [ ! "$(ls -A "${lgsmlogdir}")" ]; then
  604. echo -e "${lgsmlogdir} (NO LOG FILES)"
  605. elif [ ! -s "${lgsmlog}" ]; then
  606. echo -e "${lgsmlog} (LOG FILE IS EMPTY)"
  607. else
  608. echo -e "${lgsmlog}"
  609. tail -25 "${lgsmlog}"
  610. fi
  611. echo -e ""
  612. fi
  613. if [ -n "${consolelog}" ]; then
  614. echo -e "\nConsole log\n===================="
  615. if [ ! "$(ls -A "${consolelogdir}")" ]; then
  616. echo -e "${consolelogdir} (NO LOG FILES)"
  617. elif [ ! -s "${consolelog}" ]; then
  618. echo -e "${consolelog} (LOG FILE IS EMPTY)"
  619. else
  620. echo -e "${consolelog}"
  621. tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }'
  622. fi
  623. echo -e ""
  624. fi
  625. if [ -n "${gamelogdir}" ]; then
  626. echo -e "\nServer log\n==================="
  627. if [ ! "$(ls -A "${gamelogdir}")" ]; then
  628. echo -e "${gamelogdir} (NO LOG FILES)"
  629. else
  630. echo -e "${gamelogdir}"
  631. # dos2unix sed 's/\r//'
  632. tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
  633. fi
  634. echo -e ""
  635. fi
  636. }
  637. # Engine/Game Specific details
  638. fn_info_message_assettocorsa(){
  639. echo -e "netstat -atunp| grep acServer"
  640. echo -e ""
  641. {
  642. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  643. echo -e "> Game\tINBOUND\t${port}\tudp"
  644. echo -e "> HTTP\tINBOUND\t${port}\tudp"
  645. } | column -s $'\t' -t
  646. }
  647. fn_info_message_ark(){
  648. echo -e "netstat -atunp | grep ShooterGame"
  649. echo -e ""
  650. {
  651. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  652. echo -e "> Game\tINBOUND\t${port}\tudp"
  653. # Don't do arithmetics if ever the port wasn't a numeric value
  654. if [ "${port}" -eq "${port}" ]; then
  655. echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
  656. fi
  657. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  658. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  659. } | column -s $'\t' -t
  660. }
  661. fn_info_message_avorion() {
  662. echo "netstat -atunp | grep Avorion"
  663. echo -e ""
  664. {
  665. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  666. echo -e "> Game\tINBOUND\t${port}\tudp"
  667. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  668. } | column -s $'\t' -t
  669. }
  670. fn_info_message_ballisticoverkill(){
  671. echo -e "netstat -atunp | grep BODS.x86"
  672. echo -e ""
  673. {
  674. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  675. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  676. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  677. } | column -s $'\t' -t
  678. }
  679. fn_info_message_battalion1944(){
  680. echo -e "netstat -atunp | grep BattalionServ"
  681. echo -e ""
  682. {
  683. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  684. echo -e "> Game\tINBOUND\t${port}\tudp"
  685. # Don't do arithmetics if ever the port wasn't a numeric value
  686. # unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding
  687. if [ "${port}" -eq "${port}" ]; then
  688. echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
  689. echo -e "> Unused\tINBOUND\t$((port+2))\ttcp"
  690. fi
  691. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  692. } | column -s $'\t' -t
  693. }
  694. fn_info_message_cod(){
  695. echo -e "netstat -atunp | grep cod_lnxded"
  696. echo -e ""
  697. {
  698. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  699. echo -e "> Game\tINBOUND\t${port}\tudp"
  700. } | column -s $'\t' -t
  701. }
  702. fn_info_message_coduo(){
  703. echo -e "netstat -atunp | grep coduo_lnxded"
  704. echo -e ""
  705. {
  706. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  707. echo -e "> Game\tINBOUND\t${port}\tudp"
  708. } | column -s $'\t' -t
  709. }
  710. fn_info_message_chivalry(){
  711. fn_info_message_password_strip
  712. echo -e "netstat -atunp | grep UDKGame"
  713. echo -e ""
  714. {
  715. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  716. echo -e "> Game\tINBOUND\t${port}\tudp"
  717. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  718. echo -e "> RCON\tINBOUND\t27960\ttcp"
  719. } | column -s $'\t' -t
  720. }
  721. fn_info_message_cod2(){
  722. echo -e "netstat -atunp | grep cod2_lnxded"
  723. echo -e ""
  724. {
  725. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  726. echo -e "> Game\tINBOUND\t${port}\tudp"
  727. } | column -s $'\t' -t
  728. }
  729. fn_info_message_cod4(){
  730. echo -e "netstat -atunp"
  731. echo -e ""
  732. {
  733. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  734. echo -e "> Game\tINBOUND\t${port}\tudp"
  735. } | column -s $'\t' -t
  736. }
  737. fn_info_message_codwaw(){
  738. echo -e "netstat -atunp | grep codwaw_lnxded"
  739. echo -e ""
  740. {
  741. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  742. echo -e "> Game\tINBOUND\t${port}\tudp"
  743. } | column -s $'\t' -t
  744. }
  745. fn_info_message_dst(){
  746. echo -e "netstat -atunp | grep dontstarve"
  747. echo -e ""
  748. {
  749. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  750. echo -e "> Game: Server\tINBOUND\t${port}\tudp"
  751. echo -e "> Game: Master\tINBOUND\t${masterport}\tudp"
  752. echo -e "> Steam: Auth\tINBOUND\t${steamauthenticationport}\tudp"
  753. echo -e "> Steam: Master\tINBOUND\t${steammasterserverport}\tudp"
  754. } | column -s $'\t' -t
  755. }
  756. fn_info_message_eco(){
  757. echo -e "netstat -atunp | grep EcoServer"
  758. echo -e ""
  759. {
  760. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  761. echo -e "> Game\tINBOUND\t${port}\tudp"
  762. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp"
  763. } | column -s $'\t' -t
  764. }
  765. fn_info_message_etlegacy(){
  766. echo -e "netstat -atunp | grep etlded"
  767. echo -e ""
  768. {
  769. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  770. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  771. } | column -s $'\t' -t
  772. }
  773. fn_info_message_factorio(){
  774. echo -e "netstat -atunp | grep factorio"
  775. echo -e ""
  776. {
  777. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  778. echo -e "> Game\tINBOUND\t${port}\tudp"
  779. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  780. } | column -s $'\t' -t
  781. }
  782. fn_info_message_goldsrc(){
  783. echo -e "netstat -atunp | grep hlds_linux"
  784. echo -e ""
  785. {
  786. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  787. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  788. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  789. } | column -s $'\t' -t
  790. }
  791. fn_info_message_hurtworld(){
  792. echo -e "netstat -atunp | grep Hurtworld"
  793. echo -e ""
  794. {
  795. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  796. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  797. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  798. } | column -s $'\t' -t
  799. }
  800. fn_info_message_inss(){
  801. echo -e "netstat -atunp | grep Insurgency"
  802. echo -e ""
  803. {
  804. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  805. echo -e "> Game\tINBOUND\t${port}\tudp"
  806. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  807. if [ -n "${rconport}" ]; then
  808. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  809. fi
  810. } | column -s $'\t' -t
  811. }
  812. fn_info_message_jk2(){
  813. echo -e "netstat -atunp | grep jk2mvded"
  814. echo -e ""
  815. {
  816. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  817. echo -e "> Game\tINBOUND\t${port}\tudp"
  818. } | column -s $'\t' -t
  819. }
  820. fn_info_message_justcause2(){
  821. echo -e "netstat -atunp | grep Jcmp-Server"
  822. echo -e ""
  823. {
  824. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  825. echo -e "> Game\tINBOUND\t${port}\tudp"
  826. } | column -s $'\t' -t
  827. }
  828. fn_info_message_justcause3(){
  829. echo -e "netstat -atunp | grep Server"
  830. echo -e ""
  831. {
  832. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  833. echo -e "> Game\tINBOUND\t${port}\tudp"
  834. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  835. echo -e "> Steam\tINBOUND\t${steamport}\tudp"
  836. } | column -s $'\t' -t
  837. }
  838. fn_info_message_minecraft(){
  839. echo -e "netstat -atunp | grep java"
  840. echo -e ""
  841. {
  842. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  843. echo -e "> Game\tINBOUND\t${port}\ttcp"
  844. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  845. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
  846. } | column -s $'\t' -t
  847. }
  848. fn_info_message_minecraft_bedrock(){
  849. echo -e "netstat -atunp | grep bedrock_serv"
  850. echo -e ""
  851. {
  852. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  853. echo -e "> Game\tINBOUND\t${port}\tudp"
  854. echo -e "> Game\tINBOUND\t${port6}\tudp6"
  855. } | column -s $'\t' -t
  856. }
  857. fn_info_message_onset(){
  858. echo -e "netstat -atunp | grep OnsetServer"
  859. echo -e ""
  860. {
  861. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  862. echo -e "> Game\tINBOUND\t${port}\tudp"
  863. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  864. echo -e "> HTTP\tINBOUND\t${httpport}\ttcp"
  865. } | column -s $'\t' -t
  866. }
  867. fn_info_message_mohaa(){
  868. echo -e "netstat -atunp | grep mohaa_lnxded"
  869. echo -e ""
  870. {
  871. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  872. echo -e "> Game\tINBOUND\t${port}\tudp"
  873. } | column -s $'\t' -t
  874. }
  875. fn_info_message_mom(){
  876. echo -e "netstat -atunp | grep MemoriesOfMar"
  877. echo -e ""
  878. {
  879. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  880. echo -e "> Game\tINBOUND\t${port}\tudp"
  881. echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp"
  882. } | column -s $'\t' -t
  883. }
  884. fn_info_message_mumble(){
  885. echo -e "netstat -atunp | grep murmur"
  886. echo -e ""
  887. {
  888. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  889. echo -e "> Voice\tINBOUND\t${port}\tudp"
  890. echo -e "> ServerQuery\tINBOUND\t${port}\ttcp"
  891. } | column -s $'\t' -t
  892. }
  893. fn_info_message_pstbs(){
  894. echo -e "netstat -atunp | grep PostScriptum"
  895. echo -e ""
  896. {
  897. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  898. echo -e "> Game\tINBOUND\t${port}\tudp"
  899. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  900. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  901. } | column -s $'\t' -t
  902. }
  903. fn_info_message_projectcars(){
  904. echo -e "netstat -atunp | grep DedicatedS"
  905. echo -e ""
  906. {
  907. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  908. echo -e "> Game\tINBOUND\t${port}\tudp"
  909. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  910. echo -e "> Steam\tINBOUND\t${steamport}\tudp"
  911. } | column -s $'\t' -t
  912. }
  913. fn_info_message_projectzomboid(){
  914. echo -e "netstat -atunp | grep ProjectZomb"
  915. echo -e ""
  916. {
  917. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  918. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  919. } | column -s $'\t' -t
  920. }
  921. fn_info_message_quake(){
  922. echo -e "netstat -atunp | grep mvdsv"
  923. echo -e ""
  924. {
  925. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  926. echo -e "> Game\tINBOUND\t${port}\tudp"
  927. } | column -s $'\t' -t
  928. }
  929. fn_info_message_quake2(){
  930. echo -e "netstat -atunp | grep quake2"
  931. echo -e ""
  932. {
  933. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  934. echo -e "> Game\tINBOUND\t${port}\tudp"
  935. } | column -s $'\t' -t
  936. }
  937. fn_info_message_quake3(){
  938. echo -e "netstat -atunp | grep q3ded"
  939. echo -e ""
  940. {
  941. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  942. echo -e "> Game\tINBOUND\t${port}\tudp"
  943. } | column -s $'\t' -t
  944. }
  945. fn_info_message_quakelive(){
  946. echo -e "netstat -atunp | grep qzeroded"
  947. echo -e ""
  948. if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then
  949. echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}."
  950. echo -e ""
  951. fi
  952. {
  953. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  954. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  955. echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
  956. echo -e "> Stats\tINBOUND\t${statsport}\tudp"
  957. } | column -s $'\t' -t
  958. }
  959. fn_info_message_arma3(){
  960. echo -e "netstat -atunp | grep arma3server"
  961. echo -e ""
  962. # Default port
  963. if [ -z "${port}" ]; then
  964. port="2302"
  965. fi
  966. {
  967. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  968. echo -e "> Game\tINBOUND\t${port}\tudp"
  969. # Don't do arithmetics if ever the port wasn't a numeric value
  970. if [ "${port}" -eq "${port}" ]; then
  971. echo -e "> Query Steam\tINBOUND\t$((port+1))\tudp"
  972. echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
  973. echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
  974. fi
  975. } | column -s $'\t' -t
  976. }
  977. fn_info_message_bf1942(){
  978. echo -e "netstat -atunp | grep bf1942_lnxd"
  979. echo -e ""
  980. {
  981. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  982. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  983. echo -e "> Query Steam\tINBOUND\t${queryport}\tudp"
  984. } | column -s $'\t' -t
  985. }
  986. fn_info_message_bfv(){
  987. echo -e "netstat -atunp | grep bfv_linded"
  988. echo -e ""
  989. {
  990. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  991. echo -e "> Game\tINBOUND\t${port}\tudp"
  992. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  993. } | column -s $'\t' -t
  994. }
  995. fn_info_message_risingworld(){
  996. echo -e "netstat -atunp | grep java"
  997. echo -e ""
  998. {
  999. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1000. echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
  1001. echo -e "> Query HTTP\tINBOUND\t${httpqueryport}\ttcp"
  1002. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1003. } | column -s $'\t' -t
  1004. }
  1005. fn_info_message_rtcw(){
  1006. echo -e "netstat -atunp | grep iowolfded"
  1007. echo -e ""
  1008. {
  1009. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1010. echo -e "> Game\tINBOUND\t${port}\tudp"
  1011. } | column -s $'\t' -t
  1012. }
  1013. fn_info_message_rust(){
  1014. echo -e "netstat -atunp | grep Rust"
  1015. echo -e ""
  1016. {
  1017. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1018. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  1019. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1020. } | column -s $'\t' -t
  1021. }
  1022. fn_info_message_samp(){
  1023. echo -e "netstat -atunp | grep samp03svr"
  1024. echo -e ""
  1025. {
  1026. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1027. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  1028. } | column -s $'\t' -t
  1029. }
  1030. fn_info_message_sbots(){
  1031. echo -e "netstat -atunp | grep blank1"
  1032. echo -e ""
  1033. {
  1034. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1035. echo -e "> Game\tINBOUND\t${port}\tudp"
  1036. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1037. } | column -s $'\t' -t
  1038. }
  1039. fn_info_message_sdtd(){
  1040. fn_info_message_password_strip
  1041. echo -e "netstat -atunp | grep 7DaysToDie"
  1042. echo -e ""
  1043. {
  1044. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1045. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  1046. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1047. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp"
  1048. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp"
  1049. } | column -s $'\t' -t
  1050. echo -e ""
  1051. echo -e "${lightgreen}${gamename} Web Admin${default}"
  1052. fn_messages_separator
  1053. {
  1054. echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
  1055. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
  1056. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1057. } | column -s $'\t' -t
  1058. echo -e ""
  1059. echo -e "${lightgreen}${gamename} Telnet${default}"
  1060. fn_messages_separator
  1061. {
  1062. echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}"
  1063. echo -e "${lightblue}Telnet address:\t${default}${telnetip} ${telnetport}"
  1064. echo -e "${lightblue}Telnet password:\t${default}${telnetpass}"
  1065. } | column -s $'\t' -t
  1066. }
  1067. fn_info_message_sof2(){
  1068. echo -e "netstat -atunp | grep sof2ded"
  1069. echo -e ""
  1070. {
  1071. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1072. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  1073. } | column -s $'\t' -t
  1074. }
  1075. fn_info_message_source(){
  1076. echo -e "netstat -atunp | grep srcds_linux"
  1077. echo -e ""
  1078. {
  1079. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1080. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  1081. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
  1082. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  1083. } | column -s $'\t' -t
  1084. }
  1085. fn_info_message_spark(){
  1086. fn_info_message_password_strip
  1087. echo -e "netstat -atunp | grep server_linux"
  1088. echo -e ""
  1089. {
  1090. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1091. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  1092. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1093. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp"
  1094. } | column -s $'\t' -t
  1095. echo -e ""
  1096. echo -e "${lightgreen}${servername} Web Admin${default}"
  1097. fn_messages_separator
  1098. {
  1099. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}/index.html"
  1100. echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
  1101. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1102. } | column -s $'\t' -t
  1103. }
  1104. fn_info_message_squad(){
  1105. echo -e "netstat -atunp | grep SquadServer"
  1106. echo -e ""
  1107. {
  1108. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1109. echo -e "> Game\tINBOUND\t${port}\tudp"
  1110. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1111. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1112. } | column -s $'\t' -t
  1113. }
  1114. fn_info_message_starbound(){
  1115. echo -e "netstat -atunp | grep starbound"
  1116. echo -e ""
  1117. {
  1118. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1119. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1120. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  1121. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1122. } | column -s $'\t' -t
  1123. }
  1124. fn_info_message_stationeers(){
  1125. echo -e "netstat -atunp | grep rocketstation"
  1126. echo -e ""
  1127. {
  1128. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1129. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1130. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  1131. } | column -s $'\t' -t
  1132. }
  1133. fn_info_message_teamspeak3(){
  1134. echo -e "netstat -atunp | grep ts3server"
  1135. echo -e ""
  1136. {
  1137. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1138. echo -e "> Voice\tINBOUND\t${port}\tudp"
  1139. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp"
  1140. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
  1141. } | column -s $'\t' -t
  1142. }
  1143. fn_info_message_teeworlds(){
  1144. echo -e "netstat -atunp | grep teeworlds"
  1145. echo -e ""
  1146. {
  1147. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1148. echo -e "> Game\Query\tINBOUND\t${port}\ttcp"
  1149. } | column -s $'\t' -t
  1150. }
  1151. fn_info_message_terraria(){
  1152. echo -e "netstat -atunp | grep Terraria"
  1153. echo -e ""
  1154. {
  1155. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1156. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1157. } | column -s $'\t' -t
  1158. }
  1159. fn_info_message_towerunite(){
  1160. echo -e "netstat -atunp | grep TowerServer"
  1161. echo -e ""
  1162. {
  1163. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1164. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1165. # Don't do arithmetics if ever the port wasn't a numeric value
  1166. if [ "${port}" -eq "${port}" ]; then
  1167. echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
  1168. fi
  1169. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1170. } | column -s $'\t' -t
  1171. }
  1172. fn_info_message_unreal(){
  1173. fn_info_message_password_strip
  1174. echo -e "netstat -atunp | grep ucc-bin"
  1175. echo -e ""
  1176. {
  1177. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  1178. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  1179. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1180. if [ "${engine}" == "unreal" ]; then
  1181. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp"
  1182. fi
  1183. if [ "${engine}" != "unreal" ]&&[ "${appid}" != "223250" ]; then
  1184. echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
  1185. fi
  1186. if [ "${appid}" == "215360" ]; then
  1187. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp"
  1188. else
  1189. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp"
  1190. fi
  1191. if [ "${appid}" ]; then
  1192. if [ "${appid}" == "223250" ]; then
  1193. echo -e "> Steam\tINBOUND\t20610\tudp"
  1194. else
  1195. echo -e "> Steam\tINBOUND\t20660\tudp"
  1196. fi
  1197. fi
  1198. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1199. } | column -s $'\t' -t
  1200. echo -e ""
  1201. echo -e "${lightgreen}${servername} Web Admin${default}"
  1202. fn_messages_separator
  1203. {
  1204. echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
  1205. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
  1206. echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
  1207. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1208. } | column -s $'\t' -t
  1209. }
  1210. fn_info_message_unreal2(){
  1211. fn_info_message_password_strip
  1212. echo -e "netstat -atunp | grep ucc-bin"
  1213. echo -e ""
  1214. {
  1215. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  1216. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  1217. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1218. if [ "${appid}" != "223250" ]; then
  1219. echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
  1220. fi
  1221. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1222. } | column -s $'\t' -t
  1223. echo -e ""
  1224. echo -e "${lightgreen}${servername} Web Admin${default}"
  1225. fn_messages_separator
  1226. {
  1227. echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
  1228. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
  1229. echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
  1230. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1231. } | column -s $'\t' -t
  1232. }
  1233. fn_info_message_unreal3(){
  1234. fn_info_message_password_strip
  1235. echo -e "netstat -atunp | grep ut3-bin"
  1236. echo -e ""
  1237. {
  1238. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1239. echo -e "> Game\tINBOUND\t${port}\tudp"
  1240. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1241. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1242. } | column -s $'\t' -t
  1243. echo -e ""
  1244. echo -e "${lightgreen}${servername} Web Admin${default}"
  1245. fn_messages_separator
  1246. {
  1247. echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
  1248. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
  1249. echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
  1250. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1251. } | column -s $'\t' -t
  1252. }
  1253. fn_info_message_unturned(){
  1254. echo -e "netstat -atunp | grep Unturned"
  1255. echo -e ""
  1256. {
  1257. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1258. echo -e "> Game\tINBOUND\t${port}\tudp"
  1259. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1260. } | column -s $'\t' -t
  1261. }
  1262. fn_info_message_ut(){
  1263. echo -e "netstat -atunp | grep UE4Server"
  1264. echo -e ""
  1265. {
  1266. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1267. echo -e "> Game\tINBOUND\t${port}\tudp"
  1268. } | column -s $'\t' -t
  1269. }
  1270. fn_info_message_vh(){
  1271. echo -e "netstat -atunp | grep valheim"
  1272. echo -e ""
  1273. {
  1274. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1275. echo -e "> Game\tINBOUND\t${port}\tudp"
  1276. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1277. } | column -s $'\t' -t
  1278. }
  1279. fn_info_message_kf2(){
  1280. fn_info_message_password_strip
  1281. echo -e "netstat -atunp | grep KFGame"
  1282. echo -e ""
  1283. {
  1284. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1285. echo -e "> Game\tINBOUND\t${port}\ttcp\tPort=${port}"
  1286. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1287. echo -e "> Steam\tINBOUND\t20560\tudp"
  1288. echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1289. } | column -s $'\t' -t
  1290. echo -e ""
  1291. echo -e "${lightgreen}${servername} Web Admin${default}"
  1292. fn_messages_separator
  1293. {
  1294. echo -e "${lightblue}Web Admin enabled:\t${default}${webadminenabled}"
  1295. echo -e "${lightblue}Web Admin url:\t${default}http://${webadminip}:${webadminport}"
  1296. echo -e "${lightblue}Web Admin username:\t${default}${webadminuser}"
  1297. echo -e "${lightblue}Web Admin password:\t${default}${webadminpass}"
  1298. } | column -s $'\t' -t
  1299. }
  1300. fn_info_message_wolfensteinenemyterritory(){
  1301. echo -e "netstat -atunp | grep etded"
  1302. echo -e ""
  1303. {
  1304. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1305. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  1306. } | column -s $'\t' -t
  1307. }
  1308. fn_info_message_wurmunlimited(){
  1309. echo -e "netstat -atunp | grep WurmServer"
  1310. echo -e ""
  1311. {
  1312. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1313. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1314. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1315. } | column -s $'\t' -t
  1316. }
  1317. fn_info_message_mta(){
  1318. echo -e "netstat -atunp | grep mta-server"
  1319. echo -e ""
  1320. {
  1321. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1322. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  1323. echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp"
  1324. if [ "${ase}" == "Enabled" ]; then
  1325. echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp"
  1326. fi
  1327. } | column -s $'\t' -t
  1328. }
  1329. fn_info_message_mordhau(){
  1330. echo -e "netstat -atunp | grep Mord"
  1331. echo -e ""
  1332. {
  1333. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1334. echo -e "> Game\tINBOUND\t${port}\tudp"
  1335. echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp"
  1336. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1337. } | column -s $'\t' -t
  1338. }
  1339. fn_info_message_barotrauma(){
  1340. echo -e "netstat -atunp | grep /./Server.bin"
  1341. echo -e ""
  1342. {
  1343. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1344. echo -e "> Game\tINBOUND\t${port}\tudp"
  1345. echo -e "> Query\tINBOUND\t$((port+1))\tudp"
  1346. } | column -s $'\t' -t
  1347. }
  1348. fn_info_message_soldat() {
  1349. echo -e "netstat -atunp | grep soldat"
  1350. echo -e ""
  1351. {
  1352. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1353. echo -e "> Game\tINBOUND\t${port}\tudp"
  1354. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1355. echo -e "> FILES\tINBOUND\t$((port+10))\ttcp"
  1356. } | column -s $'\t' -t
  1357. }
  1358. fn_info_message_warfork(){
  1359. echo -e "netstat -atunp | grep wf_server"
  1360. echo -e ""
  1361. {
  1362. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1363. echo -e "> Game\tINBOUND\t${port}\tudp"
  1364. echo -e "> HTTP\tINBOUND\t${httpport}\ttcp"
  1365. } | column -s $'\t' -t
  1366. }
  1367. fn_info_message_pavlovvr(){
  1368. echo "netstat -atunp | grep Pavlov"
  1369. echo -e ""
  1370. {
  1371. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  1372. echo -e "> Game\tINBOUND\t${port}\tudp"
  1373. echo -e "> Game\tINBOUND\t$((port+400))\tudp"
  1374. } | column -s $'\t' -t
  1375. }
  1376. fn_info_message_colony(){
  1377. echo -e "netstat -atunp | grep colonyserv"
  1378. echo -e ""
  1379. {
  1380. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1381. echo -e "> Game\tINBOUND\t${port}\tudp"
  1382. echo -e "> Steam\tINBOUND\t${steamport}\tudp"
  1383. } | column -s $'\t' -t
  1384. }
  1385. fn_info_message_vintagestory(){
  1386. echo "netstat -atunp | grep cli"
  1387. echo -e ""
  1388. {
  1389. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  1390. echo -e "> Game\tINBOUND\t${port}\tTCP"
  1391. } | column -s $'\t' -t
  1392. }
  1393. fn_info_message_scpsl(){
  1394. echo -e "netstat -atunp | grep SCPSL"
  1395. echo -e ""
  1396. {
  1397. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1398. echo -e "> Game\tINBOUND\t${port}\tudp"
  1399. } | column -s $'\t' -t
  1400. }
  1401. fn_info_message_select_engine(){
  1402. # Display details depending on game or engine.
  1403. if [ "${shortname}" == "ac" ]; then
  1404. fn_info_message_assettocorsa
  1405. elif [ "${shortname}" == "ark" ]; then
  1406. fn_info_message_ark
  1407. elif [ "${shortname}" == "av" ]; then
  1408. fn_info_message_avorion
  1409. elif [ "${shortname}" == "arma3" ]; then
  1410. fn_info_message_arma3
  1411. elif [ "${shortname}" == "bf1942" ]; then
  1412. fn_info_message_bf1942
  1413. elif [ "${shortname}" == "bfv" ]; then
  1414. fn_info_message_bfv
  1415. elif [ "${shortname}" == "bo" ]; then
  1416. fn_info_message_ballisticoverkill
  1417. elif [ "${shortname}" == "bt" ]; then
  1418. fn_info_message_barotrauma
  1419. elif [ "${shortname}" == "bt1944" ]; then
  1420. fn_info_message_battalion1944
  1421. elif [ "${shortname}" == "cmw" ]; then
  1422. fn_info_message_chivalry
  1423. elif [ "${shortname}" == "cod" ]; then
  1424. fn_info_message_cod
  1425. elif [ "${shortname}" == "coduo" ]; then
  1426. fn_info_message_coduo
  1427. elif [ "${shortname}" == "cod2" ]; then
  1428. fn_info_message_cod2
  1429. elif [ "${shortname}" == "cod4" ]; then
  1430. fn_info_message_cod4
  1431. elif [ "${shortname}" == "codwaw" ]; then
  1432. fn_info_message_codwaw
  1433. elif [ "${shortname}" == "col" ]; then
  1434. fn_info_message_colony
  1435. elif [ "${shortname}" == "dst" ]; then
  1436. fn_info_message_dst
  1437. elif [ "${shortname}" == "eco" ]; then
  1438. fn_info_message_eco
  1439. elif [ "${shortname}" == "etl" ]; then
  1440. fn_info_message_etlegacy
  1441. elif [ "${shortname}" == "fctr" ]; then
  1442. fn_info_message_factorio
  1443. elif [ "${shortname}" == "hw" ]; then
  1444. fn_info_message_hurtworld
  1445. elif [ "${shortname}" == "inss" ]; then
  1446. fn_info_message_inss
  1447. elif [ "${shortname}" == "jk2" ]; then
  1448. fn_info_message_jk2
  1449. elif [ "${shortname}" == "jc2" ]; then
  1450. fn_info_message_justcause2
  1451. elif [ "${shortname}" == "jc3" ]; then
  1452. fn_info_message_justcause3
  1453. elif [ "${shortname}" == "kf2" ]; then
  1454. fn_info_message_kf2
  1455. elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then
  1456. fn_info_message_minecraft
  1457. elif [ "${shortname}" == "mcb" ]; then
  1458. fn_info_message_minecraft_bedrock
  1459. elif [ "${shortname}" == "mh" ]; then
  1460. fn_info_message_mordhau
  1461. elif [ "${shortname}" == "mohaa" ]; then
  1462. fn_info_message_mohaa
  1463. elif [ "${shortname}" == "mta" ]; then
  1464. fn_info_message_mta
  1465. elif [ "${shortname}" == "mumble" ]; then
  1466. fn_info_message_mumble
  1467. elif [ "${shortname}" == "onset" ]; then
  1468. fn_info_message_onset
  1469. elif [ "${shortname}" == "mom" ]; then
  1470. fn_info_message_mom
  1471. elif [ "${shortname}" == "pz" ]; then
  1472. fn_info_message_projectzomboid
  1473. elif [ "${shortname}" == "pstbs" ]; then
  1474. fn_info_message_pstbs
  1475. elif [ "${shortname}" == "pc" ]; then
  1476. fn_info_message_projectcars
  1477. elif [ "${shortname}" == "qw" ]; then
  1478. fn_info_message_quake
  1479. elif [ "${shortname}" == "q2" ]; then
  1480. fn_info_message_quake2
  1481. elif [ "${shortname}" == "q3" ]; then
  1482. fn_info_message_quake3
  1483. elif [ "${shortname}" == "ql" ]; then
  1484. fn_info_message_quakelive
  1485. elif [ "${shortname}" == "samp" ]; then
  1486. fn_info_message_samp
  1487. elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
  1488. fn_info_message_scpsl
  1489. elif [ "${shortname}" == "sdtd" ]; then
  1490. fn_info_message_sdtd
  1491. elif [ "${shortname}" == "squad" ]; then
  1492. fn_info_message_squad
  1493. elif [ "${shortname}" == "st" ]; then
  1494. fn_info_message_stationeers
  1495. elif [ "${shortname}" == "sof2" ]; then
  1496. fn_info_message_sof2
  1497. elif [ "${shortname}" == "sol" ]; then
  1498. fn_info_message_soldat
  1499. elif [ "${shortname}" == "sb" ]; then
  1500. fn_info_message_starbound
  1501. elif [ "${shortname}" == "sbots" ]; then
  1502. fn_info_message_sbots
  1503. elif [ "${shortname}" == "terraria" ]; then
  1504. fn_info_message_terraria
  1505. elif [ "${shortname}" == "ts3" ]; then
  1506. fn_info_message_teamspeak3
  1507. elif [ "${shortname}" == "tu" ]; then
  1508. fn_info_message_towerunite
  1509. elif [ "${shortname}" == "tw" ]; then
  1510. fn_info_message_teeworlds
  1511. elif [ "${shortname}" == "unt" ]; then
  1512. fn_info_message_unturned
  1513. elif [ "${shortname}" == "ut" ]; then
  1514. fn_info_message_ut
  1515. elif [ "${shortname}" == "vh" ]; then
  1516. fn_info_message_vh
  1517. elif [ "${shortname}" == "rtcw" ]; then
  1518. fn_info_message_rtcw
  1519. elif [ "${shortname}" == "pvr" ]; then
  1520. fn_info_message_pavlovvr
  1521. elif [ "${shortname}" == "rust" ]; then
  1522. fn_info_message_rust
  1523. elif [ "${shortname}" == "vints" ]; then
  1524. fn_info_message_vintagestory
  1525. elif [ "${shortname}" == "wf" ]; then
  1526. fn_info_message_warfork
  1527. elif [ "${shortname}" == "wurm" ]; then
  1528. fn_info_message_wurmunlimited
  1529. elif [ "${shortname}" == "rw" ]; then
  1530. fn_info_message_risingworld
  1531. elif [ "${shortname}" == "wet" ]; then
  1532. fn_info_message_wolfensteinenemyterritory
  1533. elif [ "${engine}" == "goldsrc" ]; then
  1534. fn_info_message_goldsrc
  1535. elif [ "${engine}" == "source" ]; then
  1536. fn_info_message_source
  1537. elif [ "${engine}" == "spark" ]; then
  1538. fn_info_message_spark
  1539. elif [ "${engine}" == "unreal" ]; then
  1540. fn_info_message_unreal
  1541. elif [ "${engine}" == "unreal2" ]; then
  1542. fn_info_message_unreal2
  1543. elif [ "${engine}" == "unreal3" ]; then
  1544. fn_info_message_unreal3
  1545. else
  1546. fn_print_error_nl "Unable to detect server engine."
  1547. fi
  1548. }