info_messages.sh 46 KB

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