core_getopt.sh 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. #!/bin/bash
  2. # LGSM core_getopt.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: getopt arguments.
  6. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  7. fn_getopt_generic(){
  8. case "${getopt}" in
  9. st|start)
  10. command_start.sh;;
  11. sp|stop)
  12. command_stop.sh;;
  13. r|restart)
  14. command_restart.sh;;
  15. u|update)
  16. command_update.sh;;
  17. fu|force-update|update-restart)
  18. forceupdate=1;
  19. command_update.sh;;
  20. uf|update-functions)
  21. command_update_functions.sh;;
  22. v|validate)
  23. command_validate.sh;;
  24. m|monitor)
  25. command_monitor.sh;;
  26. ta|test-alert)
  27. command_test_alert.sh;;
  28. dt|details)
  29. command_details.sh;;
  30. pd|postdetails)
  31. command_postdetails.sh;;
  32. b|backup)
  33. command_backup.sh;;
  34. c|console)
  35. command_console.sh;;
  36. d|debug)
  37. command_debug.sh;;
  38. dev|dev-debug)
  39. command_dev_debug.sh;;
  40. i|install)
  41. command_install.sh;;
  42. ai|auto-install)
  43. fn_autoinstall;;
  44. dd|detect-deps)
  45. command_dev_detect_deps.sh;;
  46. dg|detect-glibc)
  47. command_dev_detect_glibc.sh;;
  48. dl|detect-ldd)
  49. command_dev_detect_ldd.sh;;
  50. *)
  51. if [ -n "${getopt}" ]; then
  52. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  53. exitcode=2
  54. fi
  55. echo "Usage: $0 [option]"
  56. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  57. echo "https://gameservermanagers.com/${selfname}"
  58. echo -e ""
  59. echo -e "${lightyellow}Commands${default}"
  60. {
  61. echo -e "${blue}start\t${default}st |Start the server."
  62. echo -e "${blue}stop\t${default}sp |Stop the server."
  63. echo -e "${blue}restart\t${default}r |Restart the server."
  64. echo -e "${blue}update\t${default}u |Checks and applies updates from SteamCMD."
  65. echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD."
  66. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  67. echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
  68. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  69. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  70. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  71. echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
  72. echo -e "${blue}backup\t${default}b |Create archive of the server."
  73. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  74. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  75. echo -e "${blue}install\t${default}i |Install the server."
  76. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  77. } | column -s $'\t' -t
  78. esac
  79. }
  80. fn_getopt_teamspeak3(){
  81. case "${getopt}" in
  82. st|start)
  83. command_start.sh;;
  84. sp|stop)
  85. command_stop.sh;;
  86. r|restart)
  87. command_restart.sh;;
  88. u|update)
  89. command_update.sh;;
  90. uf|update-functions)
  91. command_update_functions.sh;;
  92. m|monitor)
  93. command_monitor.sh;;
  94. ta|test-alert)
  95. command_test_alert.sh;;
  96. dt|details)
  97. command_details.sh;;
  98. pd|postdetails)
  99. command_postdetails.sh;;
  100. b|backup)
  101. command_backup.sh;;
  102. pw|change-password)
  103. command_ts3_server_pass.sh;;
  104. dev|dev-debug)
  105. command_dev_debug.sh;;
  106. i|install)
  107. command_install.sh;;
  108. ai|auto-install)
  109. fn_autoinstall;;
  110. dd|detect-deps)
  111. command_dev_detect_deps.sh;;
  112. dg|detect-glibc)
  113. command_dev_detect_glibc.sh;;
  114. dl|detect-ldd)
  115. command_dev_detect_ldd.sh;;
  116. *)
  117. if [ -n "${getopt}" ]; then
  118. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  119. exitcode=2
  120. fi
  121. echo "Usage: $0 [option]"
  122. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  123. echo "https://gameservermanagers.com/${selfname}"
  124. echo -e ""
  125. echo -e "${lightyellow}Commands${default}"
  126. {
  127. echo -e "${blue}start\t${default}st |Start the server."
  128. echo -e "${blue}stop\t${default}sp |Stop the server."
  129. echo -e "${blue}restart\t${default}r |Restart the server."
  130. echo -e "${blue}update\t${default}u |Checks and applies updates from teamspeak.com."
  131. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  132. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  133. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  134. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  135. echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
  136. echo -e "${blue}change-password\t${default}pw |Changes TS3 serveradmin password."
  137. echo -e "${blue}backup\t${default}b |Create archive of the server."
  138. echo -e "${blue}install\t${default}i |Install the server."
  139. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  140. } | column -s $'\t' -t
  141. esac
  142. }
  143. fn_getopt_minecraft(){
  144. case "${getopt}" in
  145. st|start)
  146. command_start.sh;;
  147. sp|stop)
  148. command_stop.sh;;
  149. r|restart)
  150. command_restart.sh;;
  151. u|update)
  152. command_update.sh;;
  153. uf|update-functions)
  154. command_update_functions.sh;;
  155. m|monitor)
  156. command_monitor.sh;;
  157. ta|test-alert)
  158. command_test_alert.sh;;
  159. dt|details)
  160. command_details.sh;;
  161. pd|postdetails)
  162. command_postdetails.sh;;
  163. b|backup)
  164. command_backup.sh;;
  165. c|console)
  166. command_console.sh;;
  167. d|debug)
  168. command_debug.sh;;
  169. dev|dev-debug)
  170. command_dev_debug.sh;;
  171. i|install)
  172. command_install.sh;;
  173. ai|auto-install)
  174. fn_autoinstall;;
  175. dd|detect-deps)
  176. command_dev_detect_deps.sh;;
  177. dg|detect-glibc)
  178. command_dev_detect_glibc.sh;;
  179. dl|detect-ldd)
  180. command_dev_detect_ldd.sh;;
  181. *)
  182. if [ -n "${getopt}" ]; then
  183. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  184. exitcode=2
  185. fi
  186. echo "Usage: $0 [option]"
  187. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  188. echo "https://gameservermanagers.com/${selfname}"
  189. echo -e ""
  190. echo -e "${lightyellow}Commands${default}"
  191. {
  192. echo -e "${blue}start\t${default}st |Start the server."
  193. echo -e "${blue}stop\t${default}sp |Stop the server."
  194. echo -e "${blue}restart\t${default}r |Restart the server."
  195. echo -e "${blue}update\t${default}u |Checks and applies updates from mojang.com."
  196. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  197. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  198. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  199. echo -e "${blue}details\t${default}dt |Displays useful infomation about the server."
  200. echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
  201. echo -e "${blue}backup\t${default}b |Create archive of the server."
  202. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  203. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  204. echo -e "${blue}install\t${default}i |Install the server."
  205. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  206. } | column -s $'\t' -t
  207. esac
  208. }
  209. fn_getopt_mumble(){
  210. case "${getopt}" in
  211. st|start)
  212. command_start.sh;;
  213. sp|stop)
  214. command_stop.sh;;
  215. r|restart)
  216. command_restart.sh;;
  217. u|update)
  218. command_update.sh;;
  219. uf|update-functions)
  220. command_update_functions.sh;;
  221. m|monitor)
  222. command_monitor.sh;;
  223. ta|test-alert)
  224. command_test_alert.sh;;
  225. dt|details)
  226. command_details.sh;;
  227. pd|postdetails)
  228. command_postdetails.sh;;
  229. b|backup)
  230. command_backup.sh;;
  231. dev|dev-debug)
  232. command_dev_debug.sh;;
  233. i|install)
  234. command_install.sh;;
  235. dd|detect-deps)
  236. command_dev_detect_deps.sh;;
  237. dg|detect-glibc)
  238. command_dev_detect_glibc.sh;;
  239. dl|detect-ldd)
  240. command_dev_detect_ldd.sh;;
  241. *)
  242. if [ -n "${getopt}" ]; then
  243. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  244. exitcode=2
  245. fi
  246. echo "Usage: $0 [option]"
  247. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  248. echo "https://gameservermanagers.com/${selfname}"
  249. echo -e ""
  250. echo -e "${lightyellow}Commands${default}"
  251. {
  252. echo -e "${blue}start\t${default}st |Start the server."
  253. echo -e "${blue}stop\t${default}sp |Stop the server."
  254. echo -e "${blue}restart\t${default}r |Restart the server."
  255. echo -e "${blue}update\t${default}u |Checks and applies updates from GitHub."
  256. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  257. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  258. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  259. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  260. echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)"
  261. echo -e "${blue}backup\t${default}b |Create archive of the server."
  262. echo -e "${blue}install\t${default}i |Install the server."
  263. } | column -s $'\t' -t
  264. esac
  265. }
  266. fn_getopt_gmodserver(){
  267. case "${getopt}" in
  268. st|start)
  269. command_start.sh;;
  270. sp|stop)
  271. command_stop.sh;;
  272. r|restart)
  273. command_restart.sh;;
  274. u|update)
  275. command_update.sh;;
  276. fu|force-update|update-restart)
  277. forceupdate=1;
  278. command_update.sh;;
  279. uf|update-functions)
  280. command_update_functions.sh;;
  281. v|validate)
  282. command_validate.sh;;
  283. m|monitor)
  284. command_monitor.sh;;
  285. ta|test-alert)
  286. command_test_alert.sh;;
  287. dt|details)
  288. command_details.sh;;
  289. pd|postdetails)
  290. command_postdetails.sh;;
  291. b|backup)
  292. command_backup.sh;;
  293. c|console)
  294. command_console.sh;;
  295. d|debug)
  296. command_debug.sh;;
  297. dev|dev-debug)
  298. command_dev_debug.sh;;
  299. i|install)
  300. command_install.sh;;
  301. ai|auto-install)
  302. fn_autoinstall;;
  303. dd|detect-deps)
  304. command_dev_detect_deps.sh;;
  305. dg|detect-glibc)
  306. command_dev_detect_glibc.sh;;
  307. dl|detect-ldd)
  308. command_dev_detect_ldd.sh;;
  309. fd|fastdl)
  310. command_fastdl.sh;;
  311. *)
  312. if [ -n "${getopt}" ]; then
  313. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  314. exitcode=2
  315. fi
  316. echo "Usage: $0 [option]"
  317. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  318. echo "https://gameservermanagers.com/${selfname}"
  319. echo -e ""
  320. echo -e "${lightyellow}Commands${default}"
  321. {
  322. echo -e "${blue}start\t${default}st |Start the server."
  323. echo -e "${blue}stop\t${default}sp |Stop the server."
  324. echo -e "${blue}restart\t${default}r |Restart the server."
  325. echo -e "${blue}update\t${default}u |Checks and applies updates from SteamCMD."
  326. echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD."
  327. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  328. echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
  329. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  330. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  331. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  332. echo -e "${blue}backup\t${default}b |Create archive of the server."
  333. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  334. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  335. echo -e "${blue}install\t${default}i |Install the server."
  336. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  337. echo -e "${blue}fastdl\t${default}fd |Generates or update a FastDL folder for your server."
  338. } | column -s $'\t' -t
  339. esac
  340. }
  341. fn_getopt_unreal(){
  342. case "${getopt}" in
  343. st|start)
  344. command_start.sh;;
  345. sp|stop)
  346. command_stop.sh;;
  347. r|restart)
  348. command_restart.sh;;
  349. uf|update-functions)
  350. command_update_functions.sh;;
  351. m|monitor)
  352. command_monitor.sh;;
  353. ta|test-alert)
  354. command_test_alert.sh;;
  355. dt|details)
  356. command_details.sh;;
  357. b|backup)
  358. command_backup.sh;;
  359. c|console)
  360. command_console.sh;;
  361. d|debug)
  362. command_debug.sh;;
  363. dev|dev-debug)
  364. command_dev_debug.sh;;
  365. i|install)
  366. command_install.sh;;
  367. ai|auto-install)
  368. fn_autoinstall;;
  369. mc|map-compressor)
  370. compress_ut99_maps.sh;;
  371. dd|detect-deps)
  372. command_dev_detect_deps.sh;;
  373. dg|detect-glibc)
  374. command_dev_detect_glibc.sh;;
  375. dl|detect-ldd)
  376. command_dev_detect_ldd.sh;;
  377. *)
  378. if [ -n "${getopt}" ]; then
  379. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  380. exitcode=2
  381. fi
  382. echo "Usage: $0 [option]"
  383. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  384. echo "https://gameservermanagers.com/${selfname}"
  385. echo -e ""
  386. echo -e "${lightyellow}Commands${default}"
  387. {
  388. echo -e "${blue}start\t${default}st |Start the server."
  389. echo -e "${blue}stop\t${default}sp |Stop the server."
  390. echo -e "${blue}restart\t${default}r |Restart the server."
  391. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  392. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  393. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  394. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  395. echo -e "${blue}backup\t${default}b |Create archive of the server."
  396. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  397. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  398. echo -e "${blue}install\t${default}i |Install the server."
  399. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  400. echo -e "${blue}map-compressor\t${default}mc |Compresses all ${gamename} server maps."
  401. } | column -s $'\t' -t
  402. esac
  403. }
  404. fn_getopt_unreal2(){
  405. case "${getopt}" in
  406. st|start)
  407. command_start.sh;;
  408. sp|stop)
  409. command_stop.sh;;
  410. r|restart)
  411. command_restart.sh;;
  412. u|update)
  413. command_update.sh;;
  414. fu|force-update|update-restart)
  415. forceupdate=1;
  416. command_update.sh;;
  417. uf|update-functions)
  418. command_update_functions.sh;;
  419. v|validate)
  420. command_validate.sh;;
  421. m|monitor)
  422. command_monitor.sh;;
  423. ta|test-alert)
  424. command_test_alert.sh;;
  425. dt|details)
  426. command_details.sh;;
  427. b|backup)
  428. command_backup.sh;;
  429. c|console)
  430. command_console.sh;;
  431. d|debug)
  432. command_debug.sh;;
  433. dev|dev-debug)
  434. command_dev_debug.sh;;
  435. i|install)
  436. command_install.sh;;
  437. ai|auto-install)
  438. fn_autoinstall;;
  439. dd|detect-deps)
  440. command_dev_detect_deps.sh;;
  441. dg|detect-glibc)
  442. command_dev_detect_glibc.sh;;
  443. dl|detect-ldd)
  444. command_dev_detect_ldd.sh;;
  445. mc|map-compressor)
  446. compress_unreal2_maps.sh;;
  447. *)
  448. if [ -n "${getopt}" ]; then
  449. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  450. exitcode=2
  451. fi
  452. echo "Usage: $0 [option]"
  453. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  454. echo "https://gameservermanagers.com/${selfname}"
  455. echo -e ""
  456. echo -e "${lightyellow}Commands${default}"
  457. {
  458. echo -e "${blue}start\t${default}st |Start the server."
  459. echo -e "${blue}stop\t${default}sp |Stop the server."
  460. echo -e "${blue}restart\t${default}r |Restart the server."
  461. echo -e "${blue}update\t${default}Checks and applies updates from SteamCMD."
  462. echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD."
  463. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  464. echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD."
  465. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  466. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  467. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  468. echo -e "${blue}backup\t${default}b |Create archive of the server."
  469. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  470. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  471. echo -e "${blue}install\t${default}i |Install the server."
  472. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  473. echo -e "${blue}map-compressor\t${default}mc |Compresses all ${gamename} server maps."
  474. } | column -s $'\t' -t
  475. esac
  476. }
  477. fn_getopt_ut2k4(){
  478. case "${getopt}" in
  479. st|start)
  480. command_start.sh;;
  481. sp|stop)
  482. command_stop.sh;;
  483. r|restart)
  484. command_restart.sh;;
  485. uf|update-functions)
  486. command_update_functions.sh;;
  487. m|monitor)
  488. command_monitor.sh;;
  489. ta|test-alert)
  490. command_test_alert.sh;;
  491. dt|details)
  492. command_details.sh;;
  493. b|backup)
  494. command_backup.sh;;
  495. c|console)
  496. command_console.sh;;
  497. d|debug)
  498. command_debug.sh;;
  499. dev|dev-debug)
  500. command_dev_debug.sh;;
  501. i|install)
  502. command_install.sh;;
  503. ai|auto-install)
  504. fn_autoinstall;;
  505. cd|server-cd-key)
  506. install_ut2k4_key.sh;;
  507. mc|map-compressor)
  508. compress_unreal2_maps.sh;;
  509. dd|detect-deps)
  510. command_dev_detect_deps.sh;;
  511. dg|detect-glibc)
  512. command_dev_detect_glibc.sh;;
  513. dl|detect-ldd)
  514. command_dev_detect_ldd.sh;;
  515. *)
  516. if [ -n "${getopt}" ]; then
  517. echo -e "${red}Unknown command${default}: $0 ${getopt}"
  518. exitcode=2
  519. fi
  520. echo "Usage: $0 [option]"
  521. echo "${gamename} - Linux Game Server Manager - Version ${version}"
  522. echo "https://gameservermanagers.com/${selfname}"
  523. echo -e ""
  524. echo -e "${lightyellow}Commands${default}"
  525. {
  526. echo -e "${blue}start\t${default}st |Start the server."
  527. echo -e "${blue}stop\t${default}sp |Stop the server."
  528. echo -e "${blue}restart\t${default}r |Restart the server."
  529. echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded."
  530. echo -e "${blue}monitor\t${default}m |Checks that the server is running."
  531. echo -e "${blue}test-alert\t${default}ta |Sends test alert."
  532. echo -e "${blue}details\t${default}dt |Displays useful information about the server."
  533. echo -e "${blue}backup\t${default}b |Create archive of the server."
  534. echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server."
  535. echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal."
  536. echo -e "${blue}install\t${default}i |Install the server."
  537. echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts."
  538. echo -e "${blue}server-cd-key\t${default}cd |Add your server cd key"
  539. echo -e "${blue}map-compressor\t${default}mc |Compresses all ${gamename} server maps."
  540. } | column -s $'\t' -t
  541. esac
  542. }
  543. if [ "${gamename}" == "Mumble" ]; then
  544. fn_getopt_mumble
  545. elif [ "${engine}" == "lwjgl2" ]; then
  546. fn_getopt_minecraft
  547. elif [ "${gamename}" == "TeamSpeak 3" ]; then
  548. fn_getopt_teamspeak3
  549. elif [ "${gamename}" == "Garry's Mod" ]; then
  550. fn_getopt_gmodserver
  551. elif [ "${engine}" == "unreal2" ]; then
  552. if [ "${gamename}" == "Unreal Tournament 2004" ]; then
  553. fn_getopt_ut2k4
  554. else
  555. fn_getopt_unreal2
  556. fi
  557. elif [ "${engine}" == "unreal" ]; then
  558. fn_getopt_unreal
  559. else
  560. fn_getopt_generic
  561. fi
  562. core_exit.sh