From bc8083218987d3877c33c0f7bd98bdcd70fbaeaa Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Fri, 27 Jan 2017 05:31:13 +0100 Subject: [PATCH] fn_getopt_rustserver (wipe command) --- lgsm/functions/core_getopt.sh | 88 +++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index faa9c7011..495cc7825 100644 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -574,6 +574,92 @@ case "${getopt}" in esac } +fn_getopt_rustserver(){ +case "${getopt}" in + st|start) + command_start.sh;; + sp|stop) + command_stop.sh;; + r|restart) + command_restart.sh;; + u|update) + command_update.sh;; + fu|force-update|update-restart) + forceupdate=1; + command_update.sh;; + uf|update-functions) + command_update_functions.sh;; + v|validate) + command_validate.sh;; + m|monitor) + command_monitor.sh;; + ta|test-alert) + command_test_alert.sh;; + dt|details) + command_details.sh;; + pd|postdetails) + command_postdetails.sh;; + b|backup) + command_backup.sh;; + c|console) + command_console.sh;; + d|debug) + command_debug.sh;; + dev|dev-debug) + command_dev_debug.sh;; + i|install) + command_install.sh;; + ai|auto-install) + fn_autoinstall;; + mi|mods-install) + command_mods_install.sh;; + mu|mods-update) + command_mods_update.sh;; + mr|mods-remove) + command_mods_remove.sh;; + wi|wipe + command_wipe.sh + dd|detect-deps) + command_dev_detect_deps.sh;; + dg|detect-glibc) + command_dev_detect_glibc.sh;; + dl|detect-ldd) + command_dev_detect_ldd.sh;; + *) + if [ -n "${getopt}" ]; then + echo -e "${red}Unknown command${default}: $0 ${getopt}" + exitcode=2 + fi + echo "Usage: $0 [option]" + echo "${gamename} - Linux Game Server Manager - Version ${version}" + echo "https://gameservermanagers.com/${selfname}" + echo -e "" + echo -e "${lightyellow}Commands${default}" + { + echo -e "${blue}start\t${default}st |Start the server." + echo -e "${blue}stop\t${default}sp |Stop the server." + echo -e "${blue}restart\t${default}r |Restart the server." + echo -e "${blue}update\t${default}u |Checks and applies updates from SteamCMD." + echo -e "${blue}force-update\t${default}fu |Bypasses the check and applies updates from SteamCMD." + echo -e "${blue}update-functions\t${default}uf |Removes all functions so latest can be downloaded." + echo -e "${blue}validate\t${default}v |Validate server files with SteamCMD." + echo -e "${blue}monitor\t${default}m |Checks that the server is running." + echo -e "${blue}test-alert\t${default}ta |Sends test alert." + echo -e "${blue}details\t${default}dt |Displays useful information about the server." + echo -e "${blue}postdetails\t${default}pd |Post stripped details to pastebin (for support)" + echo -e "${blue}backup\t${default}b |Create archive of the server." + echo -e "${blue}console\t${default}c |Console allows you to access the live view of a server." + echo -e "${blue}debug\t${default}d |See the output of the server directly to your terminal." + echo -e "${blue}install\t${default}i |Install the server." + echo -e "${blue}auto-install\t${default}ai |Install the server, without prompts." + echo -e "${blue}mods-install\t${default}mi |View and install available mods/addons." + echo -e "${blue}mods-update\t${default}mu |Update installed mods/addons." + echo -e "${blue}mods-remove\t${default}mr |Remove installed mods/addons." + echo -e "${blue}wipe\t${default}wi |Wipe your Rust server." + } | column -s $'\t' -t + esac +} + fn_getopt_unreal(){ case "${getopt}" in st|start) @@ -796,6 +882,8 @@ elif [ "${gamename}" == "Mumble" ]; then # Teamspeak 3 elif [ "${gamename}" == "TeamSpeak 3" ]; then fn_getopt_teamspeak3 +elif [ "${gamename}" == "Rust" ]; then + fn_getopt_rustserver # Unreal 2 Engine elif [ "${engine}" == "unreal2" ]; then if [ "${gamename}" == "Unreal Tournament 2004" ]; then