27 changed files with 150 additions and 58 deletions
@ -0,0 +1 @@ |
|||
. |
@ -6,7 +6,6 @@ |
|||
fn_set_game_params settings "dependency_path" "${filesdir}" |
|||
|
|||
# Default settings. This group includes a lot of blanks just so that the comments are set (and the engine/game files will show blank values to remind people to set them). |
|||
fn_set_game_params settings "appid" "--EMPTY--" "Steam App ID" |
|||
fn_set_game_params settings "backupdir" "\${lgsmdir}/backups" "Backup Directory" |
|||
fn_set_game_params settings "defaultmap" "--EMPTY--" "Default map to load" |
|||
fn_set_game_params settings "email" "[email protected]" "Email address for notification" |
|||
@ -22,9 +21,6 @@ fn_set_game_params settings "lockselfname" ".\${servicename}.lock" "LGSM Lock Fi |
|||
fn_set_game_params settings "logdays" "7" "Number of days to retain logs" |
|||
fn_set_game_params settings "maxplayers" "--EMPTY--" "Maximum player count" |
|||
fn_set_game_params settings "port" "--EMPTY--" "Port to bind for server" |
|||
fn_set_game_params settings "steampass" "--EMPTY--" "Steam Password" |
|||
fn_set_game_params settings "steamuser" "anonymous" "Steam Username" |
|||
fn_set_game_params settings "updateonstart" "off" "Update game on start" |
|||
|
|||
# These settings are in a second group, since they reference the first group. |
|||
fn_set_game_params settings "consolelogdir" "\${lgsmdir}/log/console" "Console Log Dir" |
|||
@ -47,6 +43,22 @@ fn_set_game_params settings "servercfg" "\${servicename}\${servercfg_suffix}" "S |
|||
fn_set_game_params settings "servercfgdefault" "\${servercfgdir}/lgsm-default\${servercfg_suffix}" "Default server configuration file" |
|||
fn_set_game_params settings "servercfgfullpath" "\${servercfgdir}/\${servercfg}" "Full path to server config" |
|||
|
|||
# Script actions |
|||
fn_set_game_params scriptactions "st|start" "command_start.sh" "Start the server." |
|||
fn_set_game_params scriptactions "sp|stop" "command_stop.sh" "Stop the server." |
|||
fn_set_game_params scriptactions "r|restart" "fn_restart" "Restart the server." |
|||
fn_set_game_params scriptactions "dd|depsdetect" "command_dev_detect_deps.sh" "Detect Dependencies" |
|||
fn_set_game_params scriptactions "u|update" "update_check.sh" "Checks and applies updates from SteamCMD." |
|||
fn_set_game_params scriptactions "uf|update-functions" "update_functions.sh" "Removes all functions so latest can be downloaded." |
|||
fn_set_game_params scriptactions "m|monitor" "command_monitor.sh" "Checks that the server is running." |
|||
fn_set_game_params scriptactions "et|email-test" "command_email_test.sh" "Sends test monitor email." |
|||
fn_set_game_params scriptactions "d|details" "command_details.sh" "Displays useful infomation about the server." |
|||
fn_set_game_params scriptactions "d|debug" "command_debug.sh" "See the output of the server directly to your terminal." |
|||
fn_set_game_params scriptactions "dev|dev-debug" "command_dev_debug.sh" "Toggle Developer Debug mode" |
|||
fn_set_game_params scriptactions "i|install" "command_install.sh" "Install the server." |
|||
fn_set_game_params scriptactions "ai|auto-install" "fn_autoinstall" "Install the server, without prompts." |
|||
fn_set_game_params scriptactions "b|backup" "command_backup.sh" "Create archive of the server." |
|||
|
|||
# Default fn_parms just loads the parms file. Still need to figure out how to handle "simple" parms. |
|||
fn_parms(){ |
|||
source "${settingsdir}/parms" |
|||
|
@ -0,0 +1,17 @@ |
|||
# Game Settings File |
|||
# _steam |
|||
# Steam based games |
|||
|
|||
# Import default settings |
|||
fn_import_game_settings _default |
|||
|
|||
fn_set_game_params settings "appid" "--EMPTY--" "Steam App ID" |
|||
fn_set_game_params settings "steampass" "--EMPTY--" "Steam Password" |
|||
fn_set_game_params settings "steamuser" "anonymous" "Steam Username" |
|||
fn_set_game_params settings "updateonstart" "off" "Update game on start" |
|||
|
|||
# Script actions |
|||
fn_set_game_params scriptactions "fu|force-update|update-restart" "forceupdate=1; update_check.sh" "Bypasses the check and applies updates from SteamCMD." |
|||
fn_set_game_params scriptactions "v|validate" "command_validate.sh" "Validate server files with SteamCMD." |
|||
fn_set_game_params scriptactions "c|console" "command_console.sh" "Console allows you to access the live view of a server." |
|||
|
@ -0,0 +1,20 @@ |
|||
# Game Settings File |
|||
# _unreal_shared |
|||
# Unreal Engine Shared (across all generations) |
|||
|
|||
# Import default settings |
|||
fn_import_game_settings _default |
|||
|
|||
fn_set_game_params settings "systemdir" "${filesdir}/System" |
|||
fn_set_game_params settings "executabledir" "${systemdir}" |
|||
fn_set_game_params settings "gamelogdir" "\${systemdir}/logs" |
|||
fn_set_game_params settings "servercfgdir" "${systemdir}" |
|||
fn_set_game_params settings "servercfg" "${servicename}.ini" |
|||
fn_set_game_params settings "executable" "./ucc-bin" |
|||
fn_set_game_params settings "servercfgfullpath" "${servercfgdir}/${servercfg}" |
|||
fn_set_game_params settings "servercfgdefault" "${servercfgdir}/Default.ini" |
|||
fn_set_game_params settings "compressedmapsdir" "${rootdir}/Maps-Compressed" "Compressed Maps Directory" |
|||
|
|||
fn_set_game_params scriptactions "c|console" "command_console.sh" "Console View." |
|||
fn_set_game_params scriptactions "mc|map-compressor" "compress_ut99_maps.sh" "Map Compressor." |
|||
|
@ -0,0 +1,19 @@ |
|||
# Game Settings File |
|||
# mumbleserver |
|||
# Mumble Server |
|||
|
|||
# Import default settings |
|||
fn_import_game_settings _default |
|||
|
|||
fn_parms(){ |
|||
parms="-fg -ini ${servercfgfullpath}" |
|||
} |
|||
|
|||
fn_set_game_params settings "gamename" "Mumble" |
|||
fn_set_game_params settings "servicename" "mumble-server" |
|||
fn_set_game_params settings "executable" "./murmur.x86" |
|||
fn_set_game_params settings "servercfg" "murmur.ini" |
|||
fn_set_game_params settings "servercfgdir" "\${filesdir}" |
|||
|
|||
fn_set_game_params scriptactions "console" "command_console.sh" "Console View." |
|||
|
@ -0,0 +1,18 @@ |
|||
# Game Settings File |
|||
# ts3server |
|||
# TeamSpeak 3 Server |
|||
|
|||
# Import default settings |
|||
fn_import_game_settings _default |
|||
|
|||
fn_set_game_params settings "gamename" "TeamSpeak 3" |
|||
fn_set_game_params settings "servername" "TeamSpeak 3 Server" |
|||
fn_set_game_params settings "servicename" "ts3-server" |
|||
fn_set_game_params settings "executabledir" "\${filesdir}" |
|||
fn_set_game_params settings "executable" "./ts3server_startscript.sh" |
|||
fn_set_game_params settings "servercfg" "\${servicename}.ini" |
|||
fn_set_game_params settings "servercfgdir" "\${filesdir}" |
|||
fn_set_game_params settings "servercfgdefault" "\${servercfgdir}/lgsm-default.ini" |
|||
|
|||
fn_set_game_params scriptactions "pw|change-password" "command_ts3_server_pass.sh" "Change Password." |
|||
|
@ -3,8 +3,34 @@ |
|||
# Server Management Script |
|||
# Author: Daniel Gibbs |
|||
# Website: http://gameservermanagers.com |
|||
# |
|||
# Modified by Jared Ballou <[email protected]> |
|||
# https://github.com/jaredballou/linuxgsm |
|||
|
|||
version="260116" |
|||
# Version of script |
|||
version="300116" |
|||
|
|||
# Filename of the core script for installation |
|||
core_script="lgsm-core" |
|||
|
|||
# TODO: Add .lgsm.conf support to pre-load LGSM settings in the event of non-standard installations |
|||
|
|||
# Determine if we are running from a script file, or being piped into bash via curl |
|||
if [ "${BASH_SOURCE[0]}" != "" ]; then |
|||
# The name of this script file, used to show the LGSM link properly |
|||
scriptpath=$(readlink -f "${BASH_SOURCE[0]}") |
|||
# The basename of the real script file |
|||
selfname=$(basename "${scriptpath}") |
|||
# Name of this service (will return symlink name for multiple instance support) |
|||
servicename="$(basename $0)" |
|||
# Script root directory |
|||
rootdir="$(dirname "${scriptpath}") |
|||
else |
|||
scriptpath="$(pwd)/${core_script}" |
|||
selfname="${core_script}" |
|||
servicename="${core_script}" |
|||
rootdir="$(pwd)" |
|||
fi |
|||
|
|||
# File fetching settings |
|||
# Github Branch Select |
|||
@ -14,21 +40,11 @@ githubuser="jaredballou" |
|||
githubrepo="linuxgsm" |
|||
githubbranch="master" |
|||
|
|||
# Update stale files on the fly using Git |
|||
# Update stale files on the fly using Git. |
|||
git_update=0 |
|||
|
|||
#### Variables #### |
|||
|
|||
# The name of this script file, used to show the LGSM link properly |
|||
selfname=$(basename $(readlink -f "${BASH_SOURCE[0]}")) |
|||
|
|||
# Name of this service (for symlinked instances) |
|||
servicename="$(basename $0)" |
|||
|
|||
# Directories |
|||
|
|||
# Script root |
|||
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
|||
# LGSM Support Files - set ro rootdir for old behavior |
|||
lgsmdir="${rootdir}/lgsm" |
|||
# Temporary path to store and manipulate settings |
|||
@ -47,9 +63,6 @@ for dir in $(grep '^[a-zA-Z0-9]*dir=' $0 | cut -d'=' -f1); do |
|||
mkdir -p "${!dir}" |
|||
fi |
|||
done |
|||
# Git last commit file (for tracking updates) |
|||
lastcommit_file="${cachedir}/lastcommit" |
|||
|
|||
|
|||
# Debugging, if debugflag exists send output to $debuglog |
|||
debugflag="${lgsmdir}/.dev-debug" |
|||
@ -60,6 +73,10 @@ if [ -f "${debugflag}" ]; then |
|||
set -x |
|||
fi |
|||
|
|||
# Git last commit file (for tracking updates) |
|||
lastcommit_file="${cachedir}/lastcommit" |
|||
|
|||
|
|||
#ipaddr=$(ip addr show $(ip route | grep '^default' | awk '{print $NF}') | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/') |
|||
|
|||
##### Script ##### |
|||
@ -177,7 +194,7 @@ fn_getgithubfile "gsquery.py" norun "GameServerQuery/gsquery.py" |
|||
# Load core functions |
|||
fn_runfunction core_functions.sh |
|||
|
|||
if [ "${selfname}" == "lgsm-core" ]; |
|||
if [ "${selfname}" == "${core_script}" ]; |
|||
then |
|||
fn_runfunction install_lgsm.sh |
|||
else |
@ -1,2 +1,4 @@ |
|||
#!/bin/bash |
|||
grep gamename ../gamedata/[a-z]* | grep -v 'README\.md' | sed -e 's/^[a-z0-9A-Z\/\.]\+\///g' -e 's/\:[ \t]*fn_set_game_params settings[ \t]*"gamename"[ \t]*/ /g' > ../gamedata/__game_list |
|||
GAMEDATA=../gamedata/ |
|||
GAMELIST=${GAMEDATA}/__game_list |
|||
grep gamename ${GAMEDATA}/[a-z]* | grep -v 'README\.md' | sed -e 's/^[a-z0-9A-Z\/\.]\+\///g' -e 's/\:[ \t]*fn_set_game_params settings[ \t]*"gamename"[ \t]*/ /g' > ${GAMELIST} |
|||
|
Loading…
Reference in new issue