Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into mcserver

# Conflicts:
#	lgsm/functions/check_deps.sh
pull/1011/head
Daniel Gibbs 9 years ago
parent
commit
11f60f953f
  1. 2
      lgsm/functions/alert_email.sh
  2. 33
      lgsm/functions/check_deps.sh
  3. 2
      lgsm/functions/command_debug.sh
  4. 2
      lgsm/functions/command_details.sh
  5. 14
      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"

33
lgsm/functions/check_deps.sh

@ -9,7 +9,7 @@ local commandname="CHECK"
fn_deps_detector(){ fn_deps_detector(){
# Checks if dependency is missing # Checks if dependency is missing
if [ -n "$(command -v dpkg-query)" ]; then if [ -n "$(command -v dpkg-query)" ]; then
dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null| grep -q -P '^install ok installed$' dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null | grep -q -P '^install ok installed$'
depstatus=$? depstatus=$?
elif [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v yum)" ]; then
yum -q list installed ${deptocheck} > /dev/null 2>&1 yum -q list installed ${deptocheck} > /dev/null 2>&1
@ -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,11 +138,15 @@ 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
array_deps_required+=( tmux ) 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 )
fi
fi fi
# All servers except ts3,mumble and minecraft servers require libstdc++6 and lib32gcc1 # All servers except ts3,mumble and minecraft servers require libstdc++6 and lib32gcc1
@ -165,8 +174,8 @@ if [ -n "$(command -v dpkg-query)" ]; then
array_deps_required+=( libcurl4-gnutls-dev:i386 ) array_deps_required+=( libcurl4-gnutls-dev:i386 )
# Project Zomboid and Minecraft # Project Zomboid and Minecraft
elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; then elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; 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
if [ -f "${executabledir}/ut2004-bin" ]; then if [ -f "${executabledir}/ut2004-bin" ]; then
@ -184,11 +193,19 @@ 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
array_deps_required+=( tmux ) 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 )
fi
fi fi
# All servers except ts3,mumble and minecraft servers require glibc.i686 and libstdc++.i686 # All servers except ts3,mumble and minecraft servers require glibc.i686 and libstdc++.i686
@ -212,7 +229,7 @@ elif [ -n "$(command -v yum)" ]; then
array_deps_required+=( libcurl.i686 ) array_deps_required+=( libcurl.i686 )
# Project Zomboid and Minecraft # Project Zomboid and Minecraft
elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; then elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; 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"

14
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')"
@ -31,7 +35,7 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')"
# e.g: tmux 1.6 # e.g: tmux 1.6
if [ -z "$(command -v tmux)" ]; then if [ -z "$(command -v tmux)" ]; then
tmuxv="${red}NOT INSTALLED!${default}" tmuxv="${red}NOT INSTALLED!${default}"
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)" tmuxv="$(tmux -V) (>= 1.6 required for console log)"
else else
tmuxv=$(tmux -V) tmuxv=$(tmux -V)

2
lgsm/functions/info_glibc.sh

@ -46,7 +46,7 @@ elif [ "${engine}" == "minecraft" ]; 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