From 0d87b423dec53616f0a6488cda2298167e561692 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 10 May 2015 12:35:50 +0100 Subject: [PATCH] Merge went wrong. Fixed issue code. --- CounterStrikeGlobalOffensive/csgoserver | 9 +-- README.md | 2 +- functions/fn_details_distro | 2 +- functions/fn_functions | 5 -- functions/fn_getopt | 2 +- functions/fn_select | 84 ------------------------- functions/fn_update_sdtd_allocfixes | 33 ---------- 7 files changed, 4 insertions(+), 133 deletions(-) delete mode 100644 functions/fn_select delete mode 100644 functions/fn_update_sdtd_allocfixes diff --git a/CounterStrikeGlobalOffensive/csgoserver b/CounterStrikeGlobalOffensive/csgoserver index 372d844ba..492e6f912 100755 --- a/CounterStrikeGlobalOffensive/csgoserver +++ b/CounterStrikeGlobalOffensive/csgoserver @@ -112,12 +112,5 @@ fn_runfunction fn_functions -# init the getopt function variables getopt=$1 - -# init the select function variables -usesrvcfg=1 -getsrvcfg=$2 - -fn_select -fn_getopt +fn_getopt \ No newline at end of file diff --git a/README.md b/README.md index ea31d8b0d..a0bc59711 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Linux Game Server Managers_

linux Game Server Managers -[![Build Status](https://travis-ci.org/dgibbs64/linuxgsm.svg?branch=development)](https://travis-ci.org/dgibbs64/linuxgsm) +[![Build Status](https://travis-ci.org/dgibbs64/linuxgsm.svg?branch=master)](https://travis-ci.org/dgibbs64/linuxgsm) The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers and voice comms servers. diff --git a/functions/fn_details_distro b/functions/fn_details_distro index ef9b7bfad..174c4c794 100644 --- a/functions/fn_details_distro +++ b/functions/fn_details_distro @@ -29,7 +29,7 @@ glibcv=$(ldd --version |grep ldd|awk '{print $NF}') # e.g: tmux 1.6 if [ -z "$(command -v tmux)" ]; then tmuxv="\e[0;31mNOT INSTALLED!\e[0m" -elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then +elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:])" -lt "16" ]; then tmuxv="$(tmux -V) (>= 1.6 required for console log)" else tmuxv=$(tmux -V) diff --git a/functions/fn_functions b/functions/fn_functions index 71c8296a3..f43b0a867 100644 --- a/functions/fn_functions +++ b/functions/fn_functions @@ -273,10 +273,5 @@ functionfile="${FUNCNAME}" fn_runfunction } -fn_select(){ -functionfile="${FUNCNAME}" -fn_runfunction -} - # Calls on-screen messages fn_messages diff --git a/functions/fn_getopt b/functions/fn_getopt index 79ef40887..2d0448c2d 100644 --- a/functions/fn_getopt +++ b/functions/fn_getopt @@ -41,7 +41,7 @@ case "$getopt" in auto-install) fn_autoinstall;; *) - echo "Usage: $0 {start|stop|restart|update|force-update|validate|monitor|email-test|details|backup|console|debug|install|auto-install} $appendextra" + echo "Usage: $0 {start|stop|restart|update|force-update|validate|monitor|email-test|details|backup|console|debug|install|auto-install}" exit 1;; esac exit diff --git a/functions/fn_select b/functions/fn_select deleted file mode 100644 index 4976b0a2f..000000000 --- a/functions/fn_select +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -# LGSM fn_select function -# Author: Ilija Matoski (ilijamt@gmail.com) -# Website: https://matoski.com -# Version: 010316 - -# Description: Automatically selects a created server from the available ones defined in the root -# If no server files found . it will default to the data in the game file - -if [ $usesrvcfg -eq 1 ]; then - - if [ -z "$appid" ]; then - fn_printwarn "appid not found for $gamename, this is not supported.\n\n" - exit - fi - - # get all the available configs for the appid - cfgs=() - filelist=(`find $rootdir -type f -name "*.$appid"`) - for file in "${filelist[@]}"; do - cfg=${file:${#rootdir}+1} - cfg=${cfg:0:${#cfg} - 4} - cfgs+=("$cfg") - done - - # create the append extra list for the options - appendextra=$(printf "|%s" "${cfgs[@]}") - appendextra=${appendextra:1} - loadcfg= - invalidcfg=0 - reinit=0 - - # if we don't have any config files proced as normal so skip the next part - if [ ${#cfgs[@]} -eq 1 ]; then - # we have only one config file so we load that one only unless the user specifies it manually, then we verify - loadcfg="${cfgs[0]}"; - if [ ! -z "$getsrvcfg" ] && [ ! -f "${getsrvcfg}.${appid}" ]; then - invalidcfg=1 - fi - elif [ ${#cfgs[@]} -gt 0 ]; then - # we have more than one files available so we continue on the verification if the file is present - loadcfg="$getsrvcfg"; - if [ -z "$getsrvcfg" ] || [ ! -f "${getsrvcfg}.${appid}" ]; then - invalidcfg=1 - fi - else - # we don't have anything so we need to continue on without touching anything - reinit=0 - loadcfg= - fi - - # it's invalid cfg setting - if [ $invalidcfg -eq 1 ]; then - if [ -z "$getsrvcfg" ]; then - fn_printwarn "configuration file not specified, use one of the available ones ($appendextra)\n" - else - fn_printwarn "$getsrvcfg configuration file does not exist, use one of the available ones ($appendextra)\n" - fi - getopt= - fn_getopt - else - if [ ! -z "$loadcfg" ] && [ -f "${getsrvcfg}.${appid}" ]; then - # everything OK, load the config file and reinit the variables - source "${loadcfg}.${appid}" - reinit=1 - fi - fi - - if [ $reinit -eq 1 ]; then - case "$appid" in - *) - lockselfname=".${servicename}.lock" - servercfg="${servicename}.cfg" - servercfgfullpath="${servercfgdir}/${servercfg}" - scriptlog="${scriptlogdir}/${servicename}-script.log" - consolelog="${consolelogdir}/${servicename}-console.log" - emaillog="${scriptlogdir}/${servicename}-email.log" - scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" - consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" - ;; - esac - fi - -fi \ No newline at end of file diff --git a/functions/fn_update_sdtd_allocfixes b/functions/fn_update_sdtd_allocfixes deleted file mode 100644 index fdcd6e44b..000000000 --- a/functions/fn_update_sdtd_allocfixes +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# LGSM fn_sdtd_allocfixes function -# Author: Daniel Gibbs -# Website: http://danielgibbs.co.uk -# Version: 204014 - -# Description: Stops the server. - -if [ "${allocsfixes}" = true ]; then - sleep 5 - fn_scriptlog "Installing Alloc's Server Fixes" - echo -en "\n" - sleep 5 - echo -en "Installing Alloc's Server Fixes\n" - cd "${rootdir}"/serverfiles/ - rm -rf server_fixes.tar.gz - wget http://illy.bz/fi/7dtd/server_fixes.tar.gz - if [ -f "server_fixes.tar.gz" ]; then - tar -xzf server_fixes.tar.gz - rm -rf server_fixes.tar.gz - fn_scriptlog "Server Fixes Installed" - echo -en "Alloc's Server Fixes have been installed.\n" - else - if [ ! -f "server_fixes.tar.gz" ]; then - fn_scriptlog "Error downloading Server Fixes!" - fi - echo -en "There was a problem installing Alloc's Server Fixes!" - fi - - fn_scriptlog "Alloc's Server Fixes installed." - echo -en "FAlloc's Server Fixes installed.\n" -fi -} \ No newline at end of file