info_messages.sh 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572
  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. # Rocketchat alert: off
  352. # Slack alert: off
  353. # Email alert: off
  354. # Pushbullet alert: off
  355. # IFTTT alert: off
  356. # Mailgun (email) alert: off
  357. # Pushover alert: off
  358. # Telegram alert: off
  359. # Update on start: off
  360. # User: lgsm
  361. # Location: /home/lgsm/csgoserver
  362. # Config file: /home/lgsm/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg
  363. echo -e "${lightgreen}${selfname} Script Details${default}"
  364. fn_messages_separator
  365. {
  366. # Script name
  367. echo -e "${lightblue}Script name:\t${default}${selfname}"
  368. # LinuxGSM version
  369. if [ -n "${version}" ]; then
  370. echo -e "${lightblue}LinuxGSM version:\t${default}${version}"
  371. fi
  372. # glibc required
  373. if [ -n "${glibc}" ]; then
  374. if [ "${glibc}" == "null" ]; then
  375. # Glibc is not required.
  376. :
  377. elif [ -z "${glibc}" ]; then
  378. echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}"
  379. elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then
  380. echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})"
  381. else
  382. echo -e "${lightblue}glibc required:\t${green}${glibc}${default}"
  383. fi
  384. fi
  385. # Discord alert
  386. echo -e "${lightblue}Discord alert:\t${default}${discordalert}"
  387. # Rocketchat alert
  388. echo -e "${lightblue}Rocketchat alert:\t${default}${rocketchatalert}"
  389. # Slack alert
  390. echo -e "${lightblue}Slack alert:\t${default}${slackalert}"
  391. # Email alert
  392. echo -e "${lightblue}Email alert:\t${default}${emailalert}"
  393. # Pushbullet alert
  394. echo -e "${lightblue}Pushbullet alert:\t${default}${pushbulletalert}"
  395. # IFTTT alert
  396. echo -e "${lightblue}IFTTT alert:\t${default}${iftttalert}"
  397. # Mailgun alert
  398. echo -e "${lightblue}Mailgun (email) alert:\t${default}${mailgunalert}"
  399. # Pushover alert
  400. echo -e "${lightblue}Pushover alert:\t${default}${pushoveralert}"
  401. # Telegram alert
  402. echo -e "${lightblue}Telegram alert:\t${default}${telegramalert}"
  403. # Update on start
  404. if [ -n "${updateonstart}" ]; then
  405. echo -e "${lightblue}Update on start:\t${default}${updateonstart}"
  406. fi
  407. # User
  408. echo -e "${lightblue}User:\t${default}$(whoami)"
  409. # Script location
  410. echo -e "${lightblue}Location:\t${default}${rootdir}"
  411. # Config file location
  412. if [ -n "${servercfgfullpath}" ]; then
  413. if [ -f "${servercfgfullpath}" ]; then
  414. echo -e "${lightblue}Config file:\t${default}${servercfgfullpath}"
  415. elif [ -d "${servercfgfullpath}" ]; then
  416. echo -e "${lightblue}Config dir:\t${default}${servercfgfullpath}"
  417. else
  418. echo -e "${lightblue}Config file:\t${default}${red}${servercfgfullpath}${default} (${red}FILE MISSING${default})"
  419. fi
  420. fi
  421. # Network config file location (ARMA 3)
  422. if [ -n "${networkcfgfullpath}" ]; then
  423. echo -e "${lightblue}Network config file:\t${default}${networkcfgfullpath}"
  424. fi
  425. } | column -s $'\t' -t
  426. }
  427. fn_info_message_backup(){
  428. #
  429. # Backups
  430. # =====================================
  431. # No. of backups: 1
  432. # Latest backup:
  433. # date: Fri May 6 18:34:19 UTC 2016
  434. # file: /home/lgsm/qlserver/backups/ql-server-2016-05-06-183239.tar.gz
  435. # size: 945M
  436. echo -e ""
  437. echo -e "${lightgreen}Backups${default}"
  438. fn_messages_separator
  439. if [ ! -d "${backupdir}" ]||[ "${backupcount}" == "0" ]; then
  440. echo -e "No Backups created"
  441. else
  442. {
  443. echo -e "${lightblue}No. of backups:\t${default}${backupcount}"
  444. echo -e "${lightblue}Latest backup:${default}"
  445. if [ "${lastbackupdaysago}" == "0" ]; then
  446. echo -e "${lightblue} date:\t${default}${lastbackupdate} (less than 1 day ago)"
  447. elif [ "${lastbackupdaysago}" == "1" ]; then
  448. echo -e "${lightblue} date:\t${default}${lastbackupdate} (1 day ago)"
  449. else
  450. echo -e "${lightblue} date:\t${default}${lastbackupdate} (${lastbackupdaysago} days ago)"
  451. fi
  452. echo -e "${lightblue} file:\t${default}${lastbackup}"
  453. echo -e "${lightblue} size:\t${default}${lastbackupsize}"
  454. } | column -s $'\t' -t
  455. fi
  456. }
  457. fn_info_message_commandlineparms(){
  458. #
  459. # Command-line Parameters
  460. # =====================================
  461. # ./run_server_x86.sh +set net_strict 1
  462. echo -e ""
  463. echo -e "${lightgreen}Command-line Parameters${default}"
  464. fn_info_message_password_strip
  465. fn_messages_separator
  466. if [ "${serverpassword}" == "NOT SET" ]; then
  467. unset serverpassword
  468. fi
  469. fn_parms
  470. echo -e "${executable} ${parms}"
  471. }
  472. fn_info_message_ports(){
  473. # Ports
  474. # =====================================
  475. # Change ports by editing the parameters in:
  476. # /home/lgsm/qlserver/serverfiles/baseq3/ql-server.cfg
  477. echo -e ""
  478. echo -e "${lightgreen}Ports${default}"
  479. fn_messages_separator
  480. echo -e "${lightblue}Change ports by editing the parameters in:${default}"
  481. parmslocation="${red}UNKNOWN${default}"
  482. # engines/games that require editing in the config file.
  483. 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")
  484. for port_edit in "${ports_edit_array[@]}"
  485. do
  486. if [ "${shortname}" == "ut3" ]; then
  487. parmslocation="${servercfgdir}/UTWeb.ini"
  488. elif [ "${shortname}" == "kf2" ]; then
  489. parmslocation="${servercfgdir}/LinuxServer-KFEngine.ini\n${servercfgdir}/KFWeb.ini"
  490. elif [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
  491. parmslocation="${servercfgfullpath}"
  492. fi
  493. done
  494. # engines/games that require editing the parms.
  495. local ports_edit_array=( "Avorion" "goldsrc" "Factorio" "Hurtworld" "iw3.0" "ioquake3" "qfusion" "Rust" "Soldat" "spark" "source" "starbound" "unreal4" "realvirtuality" "Unturned" )
  496. for port_edit in "${ports_edit_array[@]}"
  497. do
  498. if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]||[ "${shortname}" == "${port_edit}" ]; then
  499. parmslocation="${configdirserver}"
  500. fi
  501. done
  502. echo -e "${parmslocation}"
  503. echo -e ""
  504. echo -e "${lightblue}Useful port diagnostic command:${default}"
  505. }
  506. fn_info_message_statusbottom(){
  507. echo -e ""
  508. if [ "${status}" == "0" ]; then
  509. echo -e "${lightblue}Status:\t${red}OFFLINE${default}"
  510. else
  511. echo -e "${lightblue}Status:\t${green}ONLINE${default}"
  512. fi
  513. echo -e ""
  514. }
  515. fn_info_logs(){
  516. echo -e ""
  517. echo -e "${selfname} Logs"
  518. echo -e "================================="
  519. if [ -n "${lgsmlog}" ]; then
  520. echo -e "\nScript log\n==================="
  521. if [ ! "$(ls -A "${lgsmlogdir}")" ]; then
  522. echo -e "${lgsmlogdir} (NO LOG FILES)"
  523. elif [ ! -s "${lgsmlog}" ]; then
  524. echo -e "${lgsmlog} (LOG FILE IS EMPTY)"
  525. else
  526. echo -e "${lgsmlog}"
  527. tail -25 "${lgsmlog}"
  528. fi
  529. echo -e ""
  530. fi
  531. if [ -n "${consolelog}" ]; then
  532. echo -e "\nConsole log\n===================="
  533. if [ ! "$(ls -A "${consolelogdir}")" ]; then
  534. echo -e "${consolelogdir} (NO LOG FILES)"
  535. elif [ ! -s "${consolelog}" ]; then
  536. echo -e "${consolelog} (LOG FILE IS EMPTY)"
  537. else
  538. echo -e "${consolelog}"
  539. tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }'
  540. fi
  541. echo -e ""
  542. fi
  543. if [ -n "${gamelogdir}" ]; then
  544. echo -e "\nServer log\n==================="
  545. if [ ! "$(ls -A "${gamelogdir}")" ]; then
  546. echo -e "${gamelogdir} (NO LOG FILES)"
  547. else
  548. echo -e "${gamelogdir}"
  549. # dos2unix sed 's/\r//'
  550. tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
  551. fi
  552. echo -e ""
  553. fi
  554. }
  555. # Engine/Game Specific details
  556. fn_info_message_assettocorsa(){
  557. echo -e "netstat -atunp| grep acServer"
  558. echo -e ""
  559. {
  560. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  561. echo -e "> Game\tINBOUND\t${port}\tudp"
  562. echo -e "> HTTP\tINBOUND\t${port}\tudp"
  563. } | column -s $'\t' -t
  564. }
  565. fn_info_message_ark(){
  566. echo -e "netstat -atunp | grep ShooterGame"
  567. echo -e ""
  568. {
  569. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  570. echo -e "> Game\tINBOUND\t${port}\tudp"
  571. # Don't do arithmetics if ever the port wasn't a numeric value
  572. if [ "${port}" -eq "${port}" ]; then
  573. echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
  574. fi
  575. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  576. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  577. } | column -s $'\t' -t
  578. }
  579. fn_info_message_avorion() {
  580. echo "netstat -atunp | grep Avorion"
  581. echo -e ""
  582. {
  583. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  584. echo -e "> Game\tINBOUND\t${port}\tudp"
  585. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  586. } | column -s $'\t' -t
  587. }
  588. fn_info_message_ballisticoverkill(){
  589. echo -e "netstat -atunp | grep BODS.x86"
  590. echo -e ""
  591. {
  592. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  593. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  594. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  595. } | column -s $'\t' -t
  596. }
  597. fn_info_message_battalion1944(){
  598. echo -e "netstat -atunp | grep BattalionServ"
  599. echo -e ""
  600. {
  601. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  602. echo -e "> Game\tINBOUND\t${port}\tudp"
  603. # Don't do arithmetics if ever the port wasn't a numeric value
  604. # unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding
  605. if [ "${port}" -eq "${port}" ]; then
  606. echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
  607. echo -e "> Unused\tINBOUND\t$((port+2))\ttcp"
  608. fi
  609. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  610. } | column -s $'\t' -t
  611. }
  612. fn_info_message_cod(){
  613. echo -e "netstat -atunp | grep cod_lnxded"
  614. echo -e ""
  615. {
  616. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  617. echo -e "> Game\tINBOUND\t${port}\tudp"
  618. } | column -s $'\t' -t
  619. }
  620. fn_info_message_coduo(){
  621. echo -e "netstat -atunp | grep coduo_lnxded"
  622. echo -e ""
  623. {
  624. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  625. echo -e "> Game\tINBOUND\t${port}\tudp"
  626. } | column -s $'\t' -t
  627. }
  628. fn_info_message_chivalry(){
  629. fn_info_message_password_strip
  630. echo -e "netstat -atunp | grep UDKGame"
  631. echo -e ""
  632. {
  633. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  634. echo -e "> Game\tINBOUND\t${port}\tudp"
  635. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  636. echo -e "> RCON\tINBOUND\t27960\ttcp"
  637. } | column -s $'\t' -t
  638. }
  639. fn_info_message_cod2(){
  640. echo -e "netstat -atunp | grep cod2_lnxded"
  641. echo -e ""
  642. {
  643. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  644. echo -e "> Game\tINBOUND\t${port}\tudp"
  645. } | column -s $'\t' -t
  646. }
  647. fn_info_message_cod4(){
  648. echo -e "netstat -atunp"
  649. echo -e ""
  650. {
  651. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  652. echo -e "> Game\tINBOUND\t${port}\tudp"
  653. } | column -s $'\t' -t
  654. }
  655. fn_info_message_codwaw(){
  656. echo -e "netstat -atunp | grep codwaw_lnxded"
  657. echo -e ""
  658. {
  659. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  660. echo -e "> Game\tINBOUND\t${port}\tudp"
  661. } | column -s $'\t' -t
  662. }
  663. fn_info_message_dst(){
  664. echo -e "netstat -atunp | grep dontstarve"
  665. echo -e ""
  666. {
  667. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  668. echo -e "> Game: Server\tINBOUND\t${port}\tudp"
  669. echo -e "> Game: Master\tINBOUND\t${masterport}\tudp"
  670. echo -e "> Steam: Auth\tINBOUND\t${steamauthenticationport}\tudp"
  671. echo -e "> Steam: Master\tINBOUND\t${steammasterserverport}\tudp"
  672. } | column -s $'\t' -t
  673. }
  674. fn_info_message_eco(){
  675. echo -e "netstat -atunp | grep mono"
  676. echo -e ""
  677. {
  678. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  679. echo -e "> Game\tINBOUND\t${port}\tudp"
  680. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  681. } | column -s $'\t' -t
  682. }
  683. fn_info_message_etlegacy(){
  684. echo -e "netstat -atunp | grep etlded"
  685. echo -e ""
  686. {
  687. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  688. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  689. } | column -s $'\t' -t
  690. }
  691. fn_info_message_factorio(){
  692. echo -e "netstat -atunp | grep factorio"
  693. echo -e ""
  694. {
  695. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  696. echo -e "> Game\tINBOUND\t${port}\tudp"
  697. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  698. } | column -s $'\t' -t
  699. }
  700. fn_info_message_goldsrc(){
  701. echo -e "netstat -atunp | grep hlds_linux"
  702. echo -e ""
  703. {
  704. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  705. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  706. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  707. } | column -s $'\t' -t
  708. }
  709. fn_info_message_hurtworld(){
  710. echo -e "netstat -atunp | grep Hurtworld"
  711. echo -e ""
  712. {
  713. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  714. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  715. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  716. } | column -s $'\t' -t
  717. }
  718. fn_info_message_inss(){
  719. echo -e "netstat -atunp | grep Insurgency"
  720. echo -e ""
  721. {
  722. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  723. echo -e "> Game\tINBOUND\t${port}\tudp"
  724. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  725. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  726. } | column -s $'\t' -t
  727. }
  728. fn_info_message_justcause2(){
  729. echo -e "netstat -atunp | grep Jcmp-Server"
  730. echo -e ""
  731. {
  732. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  733. echo -e "> Game\tINBOUND\t${port}\tudp"
  734. } | column -s $'\t' -t
  735. }
  736. fn_info_message_justcause3(){
  737. echo -e "netstat -atunp | grep Server"
  738. echo -e ""
  739. {
  740. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  741. echo -e "> Game\tINBOUND\t${port}\tudp"
  742. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  743. echo -e "> Steam\tINBOUND\t${steamport}\tudp"
  744. } | column -s $'\t' -t
  745. }
  746. fn_info_message_minecraft(){
  747. echo -e "netstat -atunp | grep java"
  748. echo -e ""
  749. {
  750. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  751. echo -e "> Game\tINBOUND\t${port}\ttcp"
  752. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  753. echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
  754. } | column -s $'\t' -t
  755. }
  756. fn_info_message_minecraft_bedrock(){
  757. echo -e "netstat -atunp | grep bedrock_serv"
  758. echo -e ""
  759. {
  760. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  761. echo -e "> Game\tINBOUND\t${port}\tudp"
  762. echo -e "> Game\tINBOUND\t${port6}\tudp6"
  763. } | column -s $'\t' -t
  764. }
  765. fn_info_message_onset(){
  766. echo -e "netstat -atunp | grep OnsetServer"
  767. echo -e ""
  768. {
  769. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  770. echo -e "> Game\tINBOUND\t${port}\tudp"
  771. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  772. echo -e "> HTTP\tINBOUND\t${httpport}\ttcp"
  773. } | column -s $'\t' -t
  774. }
  775. fn_info_message_mohaa(){
  776. echo -e "netstat -atunp | grep mohaa_lnxded"
  777. echo -e ""
  778. {
  779. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
  780. echo -e "> Game\tINBOUND\t${port}\tudp"
  781. } | column -s $'\t' -t
  782. }
  783. fn_info_message_mumble(){
  784. echo -e "netstat -atunp | grep murmur"
  785. echo -e ""
  786. {
  787. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  788. echo -e "> Voice\tINBOUND\t${port}\tudp"
  789. echo -e "> ServerQuery\tINBOUND\t${port}\ttcp"
  790. } | column -s $'\t' -t
  791. }
  792. fn_info_message_pstbs(){
  793. echo -e "netstat -atunp | grep PostScriptum"
  794. echo -e ""
  795. {
  796. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  797. echo -e "> Game\tINBOUND\t${port}\tudp"
  798. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  799. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  800. } | column -s $'\t' -t
  801. }
  802. fn_info_message_projectcars(){
  803. echo -e "netstat -atunp | grep DedicatedS"
  804. echo -e ""
  805. {
  806. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  807. echo -e "> Game\tINBOUND\t${port}\tudp"
  808. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  809. echo -e "> Steam\tINBOUND\t${steamport}\tudp"
  810. } | column -s $'\t' -t
  811. }
  812. fn_info_message_projectzomboid(){
  813. echo -e "netstat -atunp | grep ProjectZomb"
  814. echo -e ""
  815. {
  816. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  817. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  818. } | column -s $'\t' -t
  819. }
  820. fn_info_message_quake(){
  821. echo -e "netstat -atunp | grep mvdsv"
  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_quake2(){
  829. echo -e "netstat -atunp | grep quake2"
  830. echo -e ""
  831. {
  832. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  833. echo -e "> Game\tINBOUND\t${port}\tudp"
  834. } | column -s $'\t' -t
  835. }
  836. fn_info_message_quake3(){
  837. echo -e "netstat -atunp | grep q3ded"
  838. echo -e ""
  839. {
  840. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  841. echo -e "> Game\tINBOUND\t${port}\tudp"
  842. } | column -s $'\t' -t
  843. }
  844. fn_info_message_quakelive(){
  845. echo -e "netstat -atunp | grep qzeroded"
  846. echo -e ""
  847. if [ -z "${port}" ]||[ -z "${rconport}" ]||[ -z "${statsport}" ]; then
  848. echo -e "${red}ERROR!${default} Missing/commented ports in ${servercfg}."
  849. echo -e ""
  850. fi
  851. {
  852. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  853. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  854. echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
  855. echo -e "> Stats\tINBOUND\t${statsport}\tudp"
  856. } | column -s $'\t' -t
  857. }
  858. fn_info_message_arma3(){
  859. echo -e "netstat -atunp | grep arma3server"
  860. echo -e ""
  861. # Default port
  862. if [ -z "${port}" ]; then
  863. port="2302"
  864. fi
  865. {
  866. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  867. echo -e "> Game\tINBOUND\t${port}\tudp"
  868. # Don't do arithmetics if ever the port wasn't a numeric value
  869. if [ "${port}" -eq "${port}" ]; then
  870. echo -e "> Query Steam\tINBOUND\t$((port+1))\tudp"
  871. echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
  872. echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
  873. fi
  874. } | column -s $'\t' -t
  875. }
  876. fn_info_message_bf1942(){
  877. echo -e "netstat -atunp | grep bf1942_lnxd"
  878. echo -e ""
  879. {
  880. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  881. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  882. echo -e "> Query Steam\tINBOUND\t${queryport}\tudp"
  883. } | column -s $'\t' -t
  884. }
  885. fn_info_message_risingworld(){
  886. echo -e "netstat -atunp | grep java"
  887. echo -e ""
  888. {
  889. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  890. echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
  891. echo -e "> Query HTTP\tINBOUND\t${httpqueryport}\ttcp"
  892. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  893. } | column -s $'\t' -t
  894. }
  895. fn_info_message_rtcw(){
  896. echo -e "netstat -atunp | grep iowolfded"
  897. echo -e ""
  898. {
  899. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  900. echo -e "> Game\tINBOUND\t${port}\tudp"
  901. } | column -s $'\t' -t
  902. }
  903. fn_info_message_rust(){
  904. echo -e "netstat -atunp | grep Rust"
  905. echo -e ""
  906. {
  907. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  908. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  909. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  910. } | column -s $'\t' -t
  911. }
  912. fn_info_message_samp(){
  913. echo -e "netstat -atunp | grep samp03svr"
  914. echo -e ""
  915. {
  916. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  917. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  918. } | column -s $'\t' -t
  919. }
  920. fn_info_message_ss3(){
  921. echo -e "netstat -atunp | grep Sam3_Ded"
  922. echo -e ""
  923. {
  924. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  925. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp"
  926. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  927. } | column -s $'\t' -t
  928. }
  929. fn_info_message_sbots(){
  930. echo -e "netstat -atunp | grep blank1"
  931. echo -e ""
  932. {
  933. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  934. echo -e "> Game\tINBOUND\t${port}\tudp"
  935. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  936. } | column -s $'\t' -t
  937. }
  938. fn_info_message_sdtd(){
  939. fn_info_message_password_strip
  940. echo -e "netstat -atunp | grep 7DaysToDie"
  941. echo -e ""
  942. {
  943. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  944. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  945. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  946. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  947. echo -e "> Telnet\tINBOUND\t${telnetport}\ttcp"
  948. } | column -s $'\t' -t
  949. echo -e ""
  950. echo -e "${lightgreen}${servername} WebAdmin${default}"
  951. fn_messages_separator
  952. {
  953. echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
  954. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
  955. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  956. } | column -s $'\t' -t
  957. echo -e ""
  958. echo -e "${lightgreen}${servername} Telnet${default}"
  959. fn_messages_separator
  960. {
  961. echo -e "${lightblue}Telnet enabled:\t${default}${telnetenabled}"
  962. echo -e "${lightblue}Telnet address:\t${default}${ip} ${telnetport}"
  963. echo -e "${lightblue}Telnet password:\t${default}${telnetpass}"
  964. } | column -s $'\t' -t
  965. }
  966. fn_info_message_sof2(){
  967. echo -e "netstat -atunp | grep sof2ded"
  968. echo -e ""
  969. {
  970. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  971. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  972. } | column -s $'\t' -t
  973. }
  974. fn_info_message_source(){
  975. echo -e "netstat -atunp | grep srcds_linux"
  976. echo -e ""
  977. {
  978. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  979. echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
  980. echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
  981. echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
  982. } | column -s $'\t' -t
  983. }
  984. fn_info_message_spark(){
  985. fn_info_message_password_strip
  986. echo -e "netstat -atunp | grep server_linux"
  987. echo -e ""
  988. {
  989. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  990. echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
  991. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  992. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
  993. } | column -s $'\t' -t
  994. echo -e ""
  995. echo -e "${lightgreen}${servername} WebAdmin${default}"
  996. fn_messages_separator
  997. {
  998. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}/index.html"
  999. echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
  1000. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  1001. } | column -s $'\t' -t
  1002. }
  1003. fn_info_message_squad(){
  1004. echo -e "netstat -atunp | grep SquadServer"
  1005. echo -e ""
  1006. {
  1007. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1008. echo -e "> Game\tINBOUND\t${port}\tudp"
  1009. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1010. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1011. } | column -s $'\t' -t
  1012. }
  1013. fn_info_message_starbound(){
  1014. echo -e "netstat -atunp | grep starbound"
  1015. echo -e ""
  1016. {
  1017. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1018. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1019. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  1020. echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
  1021. } | column -s $'\t' -t
  1022. }
  1023. fn_info_message_stationeers(){
  1024. echo -e "netstat -atunp | grep rocketstation"
  1025. echo -e ""
  1026. {
  1027. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1028. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1029. echo -e "> Query\tINBOUND\t${queryport}\ttcp"
  1030. } | column -s $'\t' -t
  1031. }
  1032. fn_info_message_teamspeak3(){
  1033. echo -e "netstat -atunp | grep ts3server"
  1034. echo -e ""
  1035. {
  1036. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1037. echo -e "> Voice\tINBOUND\t${port}\tudp"
  1038. echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp"
  1039. echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
  1040. } | column -s $'\t' -t
  1041. }
  1042. fn_info_message_teeworlds(){
  1043. echo -e "netstat -atunp | grep teeworlds"
  1044. echo -e ""
  1045. {
  1046. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1047. echo -e "> Game\Query\tINBOUND\t${port}\ttcp"
  1048. } | column -s $'\t' -t
  1049. }
  1050. fn_info_message_terraria(){
  1051. echo -e "netstat -atunp | grep Terraria"
  1052. echo -e ""
  1053. {
  1054. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1055. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1056. } | column -s $'\t' -t
  1057. }
  1058. fn_info_message_towerunite(){
  1059. echo -e "netstat -atunp | grep TowerServer"
  1060. echo -e ""
  1061. {
  1062. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1063. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1064. # Don't do arithmetics if ever the port wasn't a numeric value
  1065. if [ "${port}" -eq "${port}" ]; then
  1066. echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
  1067. fi
  1068. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1069. } | column -s $'\t' -t
  1070. }
  1071. fn_info_message_unreal(){
  1072. fn_info_message_password_strip
  1073. echo -e "netstat -atunp | grep ucc-bin"
  1074. echo -e ""
  1075. {
  1076. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  1077. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  1078. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1079. if [ "${engine}" == "unreal" ]; then
  1080. echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp"
  1081. fi
  1082. if [ "${engine}" != "unreal" ]&&[ "${appid}" != "223250" ]; then
  1083. echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
  1084. fi
  1085. if [ "${appid}" == "215360" ]; then
  1086. echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp"
  1087. else
  1088. echo -e "< Master server\tOUTBOUND\t28900/28902\ttcp/udp"
  1089. fi
  1090. if [ "${appid}" ]; then
  1091. if [ "${appid}" == "223250" ]; then
  1092. echo -e "< Steam\tINBOUND\t20610\tudp"
  1093. else
  1094. echo -e "< Steam\tINBOUND\t20660\tudp"
  1095. fi
  1096. fi
  1097. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1098. } | column -s $'\t' -t
  1099. echo -e ""
  1100. echo -e "${lightgreen}${servername} WebAdmin${default}"
  1101. fn_messages_separator
  1102. {
  1103. echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
  1104. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
  1105. echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
  1106. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  1107. } | column -s $'\t' -t
  1108. }
  1109. fn_info_message_unreal2(){
  1110. fn_info_message_password_strip
  1111. echo -e "netstat -atunp | grep ucc-bin"
  1112. echo -e ""
  1113. {
  1114. echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
  1115. echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
  1116. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1117. if [ "${appid}" != "223250" ]; then
  1118. echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
  1119. fi
  1120. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1121. } | column -s $'\t' -t
  1122. echo -e ""
  1123. echo -e "${lightgreen}${servername} WebAdmin${default}"
  1124. fn_messages_separator
  1125. {
  1126. echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
  1127. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
  1128. echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
  1129. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  1130. } | column -s $'\t' -t
  1131. }
  1132. fn_info_message_unreal3(){
  1133. fn_info_message_password_strip
  1134. echo -e "netstat -atunp | grep ut3-bin"
  1135. echo -e ""
  1136. {
  1137. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1138. echo -e "> Game\tINBOUND\t${port}\tudp"
  1139. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1140. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1141. } | column -s $'\t' -t
  1142. echo -e ""
  1143. echo -e "${lightgreen}${servername} WebAdmin${default}"
  1144. fn_messages_separator
  1145. {
  1146. echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
  1147. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
  1148. echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
  1149. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  1150. } | column -s $'\t' -t
  1151. }
  1152. fn_info_message_unturned(){
  1153. echo -e "netstat -atunp | grep Unturned"
  1154. echo -e ""
  1155. {
  1156. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1157. echo -e "> Game\tINBOUND\t${port}\tudp"
  1158. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1159. } | column -s $'\t' -t
  1160. }
  1161. fn_info_message_ut(){
  1162. echo -e "netstat -atunp | grep UE4Server"
  1163. echo -e ""
  1164. {
  1165. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1166. echo -e "> Game\tINBOUND\t${port}\tudp"
  1167. } | column -s $'\t' -t
  1168. }
  1169. fn_info_message_kf2(){
  1170. fn_info_message_password_strip
  1171. echo -e "netstat -atunp | grep KFGame"
  1172. echo -e ""
  1173. {
  1174. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1175. echo -e "> Game\tINBOUND\t${port}\ttcp\tPort=${port}"
  1176. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1177. echo -e "> Steam\tINBOUND\t20560\tudp"
  1178. echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
  1179. } | column -s $'\t' -t
  1180. echo -e ""
  1181. echo -e "${lightgreen}${servername} WebAdmin${default}"
  1182. fn_messages_separator
  1183. {
  1184. echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
  1185. echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
  1186. echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
  1187. echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
  1188. } | column -s $'\t' -t
  1189. }
  1190. fn_info_message_wolfensteinenemyterritory(){
  1191. echo -e "netstat -atunp | grep etded"
  1192. echo -e ""
  1193. {
  1194. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1195. echo -e "> Game/Query\tINBOUND\t${port}\tudp"
  1196. } | column -s $'\t' -t
  1197. }
  1198. fn_info_message_wurmunlimited(){
  1199. echo -e "netstat -atunp | grep WurmServer"
  1200. echo -e ""
  1201. {
  1202. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1203. echo -e "> Game\tINBOUND\t${port}\ttcp"
  1204. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1205. } | column -s $'\t' -t
  1206. }
  1207. fn_info_message_mta(){
  1208. echo -e "netstat -atunp | grep mta-server"
  1209. echo -e ""
  1210. {
  1211. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1212. echo -e "> Game/Query\tOUTBOUND\t${port}\tudp"
  1213. echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp"
  1214. if [ "${ase}" == "Enabled" ]; then
  1215. echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp"
  1216. fi
  1217. } | column -s $'\t' -t
  1218. }
  1219. fn_info_message_mordhau(){
  1220. echo -e "netstat -atunp | grep Mord"
  1221. echo -e ""
  1222. {
  1223. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1224. echo -e "> Game\tINBOUND\t${port}\tudp"
  1225. echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp"
  1226. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1227. } | column -s $'\t' -t
  1228. }
  1229. fn_info_message_barotrauma(){
  1230. echo -e "netstat -atunp | grep /./Server.bin"
  1231. echo -e ""
  1232. {
  1233. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1234. echo -e "> Game\tINBOUND\t${port}\tudp"
  1235. echo -e "> Query\tINBOUND\t$((port+1))\tudp"
  1236. } | column -s $'\t' -t
  1237. }
  1238. fn_info_message_soldat() {
  1239. echo -e "netstat -atunp | grep soldat"
  1240. echo -e ""
  1241. {
  1242. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1243. echo -e "> Game\tINBOUND\t${port}\tudp"
  1244. echo -e "> Query\tINBOUND\t${queryport}\tudp"
  1245. echo -e "> FILES\tINBOUND\t$((port+10))\ttcp"
  1246. } | column -s $'\t' -t
  1247. }
  1248. fn_info_message_warfork(){
  1249. echo -e "netstat -atunp | grep wf_server"
  1250. echo -e ""
  1251. {
  1252. echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
  1253. echo -e "> Game\tINBOUND\t${port}\tudp"
  1254. echo -e "> HTTP\tINBOUND\t${httpport}\ttcp"
  1255. } | column -s $'\t' -t
  1256. }
  1257. fn_info_message_select_engine(){
  1258. # Display details depending on game or engine.
  1259. if [ "${shortname}" == "ac" ]; then
  1260. fn_info_message_assettocorsa
  1261. elif [ "${shortname}" == "ark" ]; then
  1262. fn_info_message_ark
  1263. elif [ "${shortname}" == "av" ]; then
  1264. fn_info_message_avorion
  1265. elif [ "${shortname}" == "arma3" ]; then
  1266. fn_info_message_arma3
  1267. elif [ "${shortname}" == "bo" ]; then
  1268. fn_info_message_ballisticoverkill
  1269. elif [ "${shortname}" == "bt" ]; then
  1270. fn_info_message_barotrauma
  1271. elif [ "${shortname}" == "bt1944" ]; then
  1272. fn_info_message_battalion1944
  1273. elif [ "${shortname}" == "cmw" ]; then
  1274. fn_info_message_chivalry
  1275. elif [ "${shortname}" == "cod" ]; then
  1276. fn_info_message_cod
  1277. elif [ "${shortname}" == "coduo" ]; then
  1278. fn_info_message_coduo
  1279. elif [ "${shortname}" == "cod2" ]; then
  1280. fn_info_message_cod2
  1281. elif [ "${shortname}" == "cod4" ]; then
  1282. fn_info_message_cod4
  1283. elif [ "${shortname}" == "codwaw" ]; then
  1284. fn_info_message_codwaw
  1285. elif [ "${shortname}" == "dst" ]; then
  1286. fn_info_message_dst
  1287. elif [ "${shortname}" == "eco" ]; then
  1288. fn_info_message_eco
  1289. elif [ "${shortname}" == "etl" ]; then
  1290. fn_info_message_etlegacy
  1291. elif [ "${shortname}" == "fctr" ]; then
  1292. fn_info_message_factorio
  1293. elif [ "${shortname}" == "hw" ]; then
  1294. fn_info_message_hurtworld
  1295. elif [ "${shortname}" == "inss" ]; then
  1296. fn_info_message_inss
  1297. elif [ "${shortname}" == "jc2" ]; then
  1298. fn_info_message_justcause2
  1299. elif [ "${shortname}" == "jc3" ]; then
  1300. fn_info_message_justcause3
  1301. elif [ "${shortname}" == "kf2" ]; then
  1302. fn_info_message_kf2
  1303. elif [ "${shortname}" == "mcb" ]; then
  1304. fn_info_message_minecraft_bedrock
  1305. elif [ "${shortname}" == "onset" ]; then
  1306. fn_info_message_onset
  1307. elif [ "${shortname}" == "pz" ]; then
  1308. fn_info_message_projectzomboid
  1309. elif [ "${shortname}" == "pstbs" ]; then
  1310. fn_info_message_pstbs
  1311. elif [ "${shortname}" == "pc" ]; then
  1312. fn_info_message_projectcars
  1313. elif [ "${shortname}" == "qw" ]; then
  1314. fn_info_message_quake
  1315. elif [ "${shortname}" == "q2" ]; then
  1316. fn_info_message_quake2
  1317. elif [ "${shortname}" == "q3" ]; then
  1318. fn_info_message_quake3
  1319. elif [ "${shortname}" == "ql" ]; then
  1320. fn_info_message_quakelive
  1321. elif [ "${shortname}" == "samp" ]; then
  1322. fn_info_message_samp
  1323. elif [ "${shortname}" == "sdtd" ]; then
  1324. fn_info_message_sdtd
  1325. elif [ "${shortname}" == "squad" ]; then
  1326. fn_info_message_squad
  1327. elif [ "${shortname}" == "st" ]; then
  1328. fn_info_message_stationeers
  1329. elif [ "${shortname}" == "sof2" ]; then
  1330. fn_info_message_sof2
  1331. elif [ "${shortname}" == "sol" ]; then
  1332. fn_info_message_soldat
  1333. elif [ "${shortname}" == "st" ]; then
  1334. fn_info_message_starbound
  1335. elif [ "${shortname}" == "sbots" ]; then
  1336. fn_info_message_sbots
  1337. elif [ "${shortname}" == "ss3" ]; then
  1338. fn_info_message_ss3
  1339. elif [ "${shortname}" == "terraria" ]; then
  1340. fn_info_message_terraria
  1341. elif [ "${shortname}" == "ts3" ]; then
  1342. fn_info_message_teamspeak3
  1343. elif [ "${shortname}" == "tu" ]; then
  1344. fn_info_message_towerunite
  1345. elif [ "${shortname}" == "tw" ]; then
  1346. fn_info_message_teeworlds
  1347. elif [ "${shortname}" == "unt" ]; then
  1348. fn_info_message_unturned
  1349. elif [ "${shortname}" == "ut" ]; then
  1350. fn_info_message_ut
  1351. elif [ "${shortname}" == "mc" ]; then
  1352. fn_info_message_minecraft
  1353. elif [ "${shortname}" == "mh" ]; then
  1354. fn_info_message_mordhau
  1355. elif [ "${shortname}" == "mohaa" ]; then
  1356. fn_info_message_mohaa
  1357. elif [ "${shortname}" == "mta" ]; then
  1358. fn_info_message_mta
  1359. elif [ "${shortname}" == "mumble" ]; then
  1360. fn_info_message_mumble
  1361. elif [ "${shortname}" == "bf1942" ]; then
  1362. fn_info_message_bf1942
  1363. elif [ "${shortname}" == "rtcw" ]; then
  1364. fn_info_message_rtcw
  1365. elif [ "${shortname}" == "rust" ]; then
  1366. fn_info_message_rust
  1367. elif [ "${shortname}" == "wf" ]; then
  1368. fn_info_message_warfork
  1369. elif [ "${shortname}" == "wurm" ]; then
  1370. fn_info_message_wurmunlimited
  1371. elif [ "${shortname}" == "rw" ]; then
  1372. fn_info_message_risingworld
  1373. elif [ "${shortname}" == "wet" ]; then
  1374. fn_info_message_wolfensteinenemyterritory
  1375. elif [ "${engine}" == "goldsrc" ]; then
  1376. fn_info_message_goldsrc
  1377. elif [ "${engine}" == "source" ]; then
  1378. fn_info_message_source
  1379. elif [ "${engine}" == "spark" ]; then
  1380. fn_info_message_spark
  1381. elif [ "${engine}" == "unreal" ]; then
  1382. fn_info_message_unreal
  1383. elif [ "${engine}" == "unreal2" ]; then
  1384. fn_info_message_unreal2
  1385. elif [ "${engine}" == "unreal3" ]; then
  1386. fn_info_message_unreal3
  1387. else
  1388. fn_print_error_nl "Unable to detect server engine."
  1389. fi
  1390. }
  1391. # Separator is different for details
  1392. fn_messages_separator(){
  1393. if [ "${commandname}" == "details" ]; then
  1394. printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
  1395. else
  1396. echo -e "================================="
  1397. fi
  1398. }
  1399. # Removes the passwords form all but details
  1400. fn_info_message_password_strip(){
  1401. if [ "${commandname}" != "DETAILS" ]; then
  1402. if [ "${serverpassword}" ]; then
  1403. serverpassword="********"
  1404. fi
  1405. if [ "${rconpassword}" ]; then
  1406. rconpassword="********"
  1407. fi
  1408. if [ "${adminpassword}" ]; then
  1409. adminpassword="********"
  1410. fi
  1411. if [ "${statspassword}" ]; then
  1412. statspassword="********"
  1413. fi
  1414. if [ "${webadminpass}" ]; then
  1415. webadminpass="********"
  1416. fi
  1417. if [ "${telnetpass}" ]; then
  1418. telnetpass="********"
  1419. fi
  1420. if [ "${wsapikey}" ]; then
  1421. wsapikey="********"
  1422. fi
  1423. if [ "${gslt}" ]; then
  1424. gslt="********"
  1425. fi
  1426. fi
  1427. }