Sfoglia il codice sorgente

Removing very old functions for legacy code

If you havnt updated your scripts by now you really need to.
Daniel Gibbs 9 anni fa
parent
commit
530fcd2686

+ 0 - 38
functions/command_update_functions.sh

@@ -1,38 +0,0 @@
-#!/bin/bash
-# LGSM command_update_functions.sh function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: Deletes the functions dir to allow re-downloading of functions from GitHub.
-
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
-check.sh
-fn_print_dots "Updating functions"
-fn_script_log "Updating functions"
-sleep 1
-echo -ne "\n"
-
-# Removed legecy functions dir
-if [ -n "${rootdir}" ]; then
-	if [ -d "${rootdir}/functions/" ]; then
-		rm -rfv "${rootdir}/functions/"
-		exitcode=$?
-	fi
-fi
-
-if [ -n "${functionsdir}" ]; then
-	if [ -d "${functionsdir}" ]; then
-		rm -rfv "${functionsdir}/"*
-		exitcode=$?
-	fi
-fi
-
-if [ "${exitcode}" == "0" ]; then
-	fn_print_ok "Updating functions"
-	fn_script_log "Success! Updating functions"
-else
-	fn_print_fail "Updating functions"
-	fn_script_log "Failure! Updating functions"
-fi
-echo -ne "\n"

+ 0 - 72
functions/core_functions.sh

@@ -1,72 +0,0 @@
-#!/bin/bash
-# LGSM core_functions.sh function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new location for core_functions.sh
-
-# fn_fetch_core_dl also placed here to allow legecy servers to still download core functions
-if [ -z "${lgsmdir}" ]; then
-	lgsmdir="${rootdir}/lgsm"
-	functionsdir="${lgsmdir}/functions"
-	libdir="${lgsmdir}/lib"
-fi
-
-fn_fetch_core_dl(){
-if [ -z "${githubuser}" ]; then
-	githubuser="GameServerManagers"
-fi
-if [ -z "${githubrepo}" ]; then
-	githubrepo="LinuxGSM"
-fi
-if [ -z "${githubbranch}" ]; then
-	githubbranch="master"
-fi
-github_file_url_dir="lgsm/functions"
-github_file_url_name="${functionfile}"
-filedir="${functionsdir}"
-filename="${github_file_url_name}"
-githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
-# If the file is missing, then download
-if [ ! -f "${filedir}/${filename}" ]; then
-	if [ ! -d "${filedir}" ]; then
-		mkdir -p "${filedir}"
-	fi
-	echo -e "    fetching ${filename}...\c"
-	# Check curl exists and use available path
-	curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
-	for curlcmd in ${curlpaths}
-	do
-		if [ -x "${curlcmd}" ]; then
-			break
-		fi
-	done
-	# If curl exists download file
-	if [ "$(basename ${curlcmd})" == "curl" ]; then
-		curlfetch=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${githuburl}" 2>&1)
-		if [ $? -ne 0 ]; then
-			echo -e "${red}FAIL${default}\n"
-			echo "${curlfetch}"
-			echo -e "${githuburl}\n"
-			exit 1
-		else
-			echo -e "${green}OK${default}"
-		fi
-	else
-		echo -e "${red}FAIL${default}\n"
-		echo "Curl is not installed!"
-		echo -e ""
-		exit 1
-	fi
-	chmod +x "${filedir}/${filename}"
-fi
-source "${filedir}/${filename}"
-}
-
-core_functions.sh(){
-functionfile="${FUNCNAME}"
-fn_fetch_core_dl
-}
-
-core_functions.sh

+ 0 - 14
functions/core_getopt.sh

@@ -1,14 +0,0 @@
-#!/bin/bash
-# LGSM core_getopt.sh function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new location for core_getopt.sh
-
-core_getopt.sh(){
-functionfile="${FUNCNAME}"
-fn_fetch_core_dl
-}
-
-core_getopt.sh

+ 0 - 15
functions/fn_functions

@@ -1,15 +0,0 @@
-#!/bin/bash
-# LGSM fn_functions function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new core_functions.sh
-
-core_functions.sh(){
-# Functions are defined in core_functions.sh.
-functionfile="${FUNCNAME}"
-fn_runfunction
-}
-
-core_functions.sh

+ 0 - 14
functions/fn_getopt

@@ -1,14 +0,0 @@
-#!/bin/bash
-# LGSM fn_getopt.sh function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new core_getopt.sh
-
-core_getopt.sh(){
-functionfile="${FUNCNAME}"
-fn_fetch_core_dl
-}
-
-core_getopt.sh

+ 0 - 15
functions/fn_update_functions

@@ -1,15 +0,0 @@
-#!/bin/bash
-# LGSM fn_update_functions function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new command_update_functions.sh
-
-command_update_functions.sh(){
-functionfile="${FUNCNAME}"
-fn_runfunction
-}
-
-command_update_functions.sh
-

+ 0 - 15
functions/update_functions.sh

@@ -1,15 +0,0 @@
-#!/bin/bash
-# LGSM fn_update_functions function
-# Author: Daniel Gibbs
-# Website: https://gameservermanagers.com
-lgsm_version="210516"
-
-# Description: REDIRECT FUNCTION to new command_update_functions.sh
-
-command_update_functions.sh(){
-functionfile="${FUNCNAME}"
-fn_runfunction
-}
-
-command_update_functions.sh
-