diff --git a/functions/fn_getopt b/functions/fn_getopt index 1b9b281d4..0ffdb9c4e 100644 --- a/functions/fn_getopt +++ b/functions/fn_getopt @@ -2,7 +2,7 @@ # LGSM fn_getopt function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 200615 +# Version: 301015 # Description: getopt arguments. @@ -113,6 +113,75 @@ esac exit } +fn_getopt_gmodserver(){ +case "$getopt" in + start) + fn_start;; + stop) + fn_stop;; + restart) + fn_restart;; + update) + fn_update_check;; + force-update|update-restart) + forceupdate=1; + fn_update_check;; + update-functions|updatefunctions) + fn_update_functions;; + validate) + fn_validate;; + monitor) + fn_monitor;; + email-test|emailtest) + fn_email_test;; + details) + fn_details;; + backup) + fn_backup;; + console) + fn_console;; + debug) + fn_debug;; + install) + fn_install;; + auto-install|autoinstall) + fn_autoinstall;; + content) +echo + fn_content_gmod;; + depsdetect) + fn_deps_detect;; + *) + echo "Usage: $0 [option] + +${gamename} - Linux Game Server Manager - Version ${version} +http://gameservermanagers.com/${selfname}" +echo -e "" +echo -e "\e[93mCommands\e[0m" + +{ + echo -e "\e[34mstart\t\e[0mStart the server." + echo -e "\e[34mstop\t\e[0mStop the server." + echo -e "\e[34mrestart\t\e[0mRestart the server." + echo -e "\e[34mupdate\t\e[0mChecks and applies updates from SteamCMD." + echo -e "\e[34mforce-update\t\e[0mBypasses the check and applies updates from SteamCMD." + echo -e "\e[34mupdate-functions\t\e[0mRemoves all functions so latest can be downloaded." + echo -e "\e[34mvalidate\t\e[0mValidate server files with SteamCMD." + echo -e "\e[34mmonitor\t\e[0mChecks that the server is running." + echo -e "\e[34mdetails\t\e[0mDisplays useful infomation about the server." + echo -e "\e[34mbackup\t\e[0mCreate archive of the server." + echo -e "\e[34mconsole\t\e[0mConsole allows you to access the live view of a server." + echo -e "\e[34mdebug\t\e[0mSee the output of the server directly to your terminal." + echo -e "\e[34minstall\t\e[0mInstall the server." + echo -e "\e[34mauto-install\t\e[0mInstall the server, without prompts." + echo -e "\e[34mgmod-content\t\e[0mDownload gmod add-on content." + +} | column -s $'\t' -t +esac +exit +} + + fn_getopt_unreal(){ case "$getopt" in start) @@ -244,6 +313,8 @@ elif [ "${engine}" == "unreal2" ]; then fi elif [ "${engine}" == "unreal" ]; then fn_getopt_unreal +elif [ "$gamename" == "Garry's Mod" ]; then + fn_getopt_gmodserver else fn_getopt_generic -fi \ No newline at end of file +fi