Browse Source

Merge pull request #981 from dgibbs64/development

check_deps.sh improvements
pull/987/head
Daniel Gibbs 9 years ago
committed by GitHub
parent
commit
801605e292
  1. 2
      lgsm/functions/alert_email.sh
  2. 25
      lgsm/functions/check_deps.sh
  3. 2
      lgsm/functions/command_debug.sh
  4. 2
      lgsm/functions/command_details.sh
  5. 12
      lgsm/functions/info_distro.sh
  6. 2
      lgsm/functions/info_glibc.sh

2
lgsm/functions/alert_email.sh

@ -32,7 +32,7 @@ fn_details_os(){
echo -e "" echo -e ""
echo -e "Distro Details" echo -e "Distro Details"
echo -e "=================================" echo -e "================================="
echo -e "Distro: ${os}" echo -e "Distro: ${distroname}"
echo -e "Arch: ${arch}" echo -e "Arch: ${arch}"
echo -e "Kernel: ${kernel}" echo -e "Kernel: ${kernel}"
echo -e "Hostname: $HOSTNAME" echo -e "Hostname: $HOSTNAME"

25
lgsm/functions/check_deps.sh

@ -18,6 +18,11 @@ fn_deps_detector(){
if [ "${depstatus}" == "0" ]; then if [ "${depstatus}" == "0" ]; then
missingdep=0 missingdep=0
if [ "${function_selfname}" == "command_install.sh" ]; then if [ "${function_selfname}" == "command_install.sh" ]; then
if [ "${tmuxcheck}" != "1" ]; then
# Added for users compiling tmux from source to bypass rpm check
echo -e "${green}tmux${default}"
tmuxcheck=1
fi
echo -e "${green}${deptocheck}${default}" echo -e "${green}${deptocheck}${default}"
sleep 0.5 sleep 0.5
fi fi
@ -133,12 +138,16 @@ if [ -n "$(command -v dpkg-query)" ]; then
array_deps_missing=() array_deps_missing=()
# LGSM requirements # LGSM requirements
array_deps_required=( curl ca-certificates file bsdmainutils util-linux python ) array_deps_required=( curl ca-certificates file bsdmainutils util-linux python bzip2 gzip )
# All servers except ts3 require tmux # All servers except ts3 require tmux
if [ "${executable}" != "./ts3server_startscript.sh" ]; then if [ "${executable}" != "./ts3server_startscript.sh" ]; then
if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
: # Added for users compiling tmux from source to bypass rpm check
else
array_deps_required+=( tmux ) array_deps_required+=( tmux )
fi fi
fi
# All servers except ts3 & mumble require libstdc++6, lib32gcc1 # All servers except ts3 & mumble require libstdc++6, lib32gcc1
if [ "${executable}" != "./ts3server_startscript.sh" ]||[ "${executable}" != "./murmur.x86" ]; then if [ "${executable}" != "./ts3server_startscript.sh" ]||[ "${executable}" != "./murmur.x86" ]; then
@ -165,7 +174,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
array_deps_required+=( libcurl4-gnutls-dev:i386 ) array_deps_required+=( libcurl4-gnutls-dev:i386 )
# Project Zomboid # Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]; then
array_deps_required+=( openjdk-7-jre ) array_deps_required+=( default-jdk )
# Unreal engine # Unreal engine
elif [ "${executable}" == "./ucc-bin" ]; then elif [ "${executable}" == "./ucc-bin" ]; then
#UT2K4 #UT2K4
@ -184,12 +193,20 @@ elif [ -n "$(command -v yum)" ]; then
array_deps_missing=() array_deps_missing=()
# LGSM requirements # LGSM requirements
array_deps_required=( curl util-linux python file ) if [ "${distroversion}" == "6" ]; then
array_deps_required=( curl util-linux-ng python file gzip bzip2 )
else
array_deps_required=( curl util-linux python file gzip bzip2 )
fi
# All servers except ts3 require tmux # All servers except ts3 require tmux
if [ "${executable}" != "./ts3server_startscript.sh" ]; then if [ "${executable}" != "./ts3server_startscript.sh" ]; then
if [ "$(command -v tmux)" ]||[ "$(which tmux)" ]||[ -f "/usr/bin/tmux" ]||[ -f "/bin/tmux" ]; then
: # Added for users compiling tmux from source to bypass rpm check
else
array_deps_required+=( tmux ) array_deps_required+=( tmux )
fi fi
fi
# All servers excelts ts3 & mumble require glibc.i686 libstdc++.i686 # All servers excelts ts3 & mumble require glibc.i686 libstdc++.i686
if [ "${executable}" != "./ts3server_startscript.sh" ]||[ "${executable}" != "./murmur.x86" ]; then if [ "${executable}" != "./ts3server_startscript.sh" ]||[ "${executable}" != "./murmur.x86" ]; then
@ -212,7 +229,7 @@ elif [ -n "$(command -v yum)" ]; then
array_deps_required+=( libcurl.i686 ) array_deps_required+=( libcurl.i686 )
# Project Zomboid # Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]; then
array_deps_required+=( java-1.7.0-openjdk ) array_deps_required+=( java-1.8.0-openjdk )
# Unreal Engine # Unreal Engine
elif [ "${executable}" == "./ucc-bin" ]; then elif [ "${executable}" == "./ucc-bin" ]; then
#UT2K4 #UT2K4

2
lgsm/functions/command_debug.sh

@ -28,7 +28,7 @@ echo ""
echo "${gamename} Debug" echo "${gamename} Debug"
echo "=================================" echo "================================="
echo "" echo ""
echo -e "Distro: ${os}" echo -e "Distro: ${distroname}"
echo -e "Arch: ${arch}" echo -e "Arch: ${arch}"
echo -e "Kernel: ${kernel}" echo -e "Kernel: ${kernel}"
echo -e "Hostname: $HOSTNAME" echo -e "Hostname: $HOSTNAME"

2
lgsm/functions/command_details.sh

@ -27,7 +27,7 @@ fn_details_os(){
echo -e "${lightyellow}Distro Details${default}" echo -e "${lightyellow}Distro Details${default}"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
{ {
echo -e "${blue}Distro:\t${default}${os}" echo -e "${blue}Distro:\t${default}${distroname}"
echo -e "${blue}Arch:\t${default}${arch}" echo -e "${blue}Arch:\t${default}${arch}"
echo -e "${blue}Kernel:\t${default}${kernel}" echo -e "${blue}Kernel:\t${default}${kernel}"
echo -e "${blue}Hostname:\t${default}$HOSTNAME" echo -e "${blue}Hostname:\t${default}$HOSTNAME"

12
lgsm/functions/info_distro.sh

@ -14,15 +14,19 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
arch=$(uname -m) arch=$(uname -m)
kernel=$(uname -r) kernel=$(uname -r)
if [ -n "$(command -v lsb_release)" ]; then if [ -n "$(command -v lsb_release)" ]; then
os=$(lsb_release -s -d) distroname=$(lsb_release -s -d)
elif [ -f "/etc/os-release" ]; then
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="')
elif [ -f "/etc/debian_version" ]; then elif [ -f "/etc/debian_version" ]; then
os="Debian $(cat /etc/debian_version)" distroname="Debian $(cat /etc/debian_version)"
elif [ -f "/etc/redhat-release" ]; then elif [ -f "/etc/redhat-release" ]; then
os=$(cat /etc/redhat-release) distroname=$(cat /etc/redhat-release)
else else
os="$(uname -s) $(uname -r)" distroname="$(uname -s) $(uname -r)"
fi fi
distroversion=$(grep VERSION_ID /etc/os-release | tr -cd '[:digit:]')
## Glibc version ## Glibc version
# e.g: 1.17 # e.g: 1.17
glibcversion="$(ldd --version | sed -n '1s/.* //p')" glibcversion="$(ldd --version | sed -n '1s/.* //p')"

2
lgsm/functions/info_glibc.sh

@ -37,7 +37,7 @@ elif [ "${engine}" == "dontstarve" ]; then
glibcfix="no" glibcfix="no"
elif [ "${engine}" == "projectzomboid" ]; then elif [ "${engine}" == "projectzomboid" ]; then
glibcrequired="2.15" glibcrequired="2.15"
glibcfix="yesno" glibcfix="no"
elif [ "${engine}" == "realvirtuality" ]; then elif [ "${engine}" == "realvirtuality" ]; then
glibcrequired="2.13" glibcrequired="2.13"
glibcfix="yes" glibcfix="yes"

Loading…
Cancel
Save