diff --git a/lgsm/functions/alert_email.sh b/lgsm/functions/alert_email.sh index a89ef4967..52529db6f 100644 --- a/lgsm/functions/alert_email.sh +++ b/lgsm/functions/alert_email.sh @@ -32,7 +32,7 @@ fn_details_os(){ echo -e "" echo -e "Distro Details" echo -e "=================================" - echo -e "Distro: ${os}" + echo -e "Distro: ${distroname}" echo -e "Arch: ${arch}" echo -e "Kernel: ${kernel}" echo -e "Hostname: $HOSTNAME" diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 964095db3..f4ffe1f7f 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -9,7 +9,7 @@ local commandname="CHECK" fn_deps_detector(){ # Checks if dependency is missing 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=$? elif [ -n "$(command -v yum)" ]; then yum -q list installed ${deptocheck} > /dev/null 2>&1 @@ -18,6 +18,11 @@ fn_deps_detector(){ if [ "${depstatus}" == "0" ]; then missingdep=0 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}" sleep 0.5 fi @@ -133,11 +138,15 @@ if [ -n "$(command -v dpkg-query)" ]; then array_deps_missing=() # 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 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 # 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 ) # Project Zomboid and Minecraft elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; then - array_deps_required+=( openjdk-7-jre ) - # Unreal engine + array_deps_required+=( default-jdk ) + # Unreal Engine elif [ "${executable}" == "./ucc-bin" ]; then #UT2K4 if [ -f "${executabledir}/ut2004-bin" ]; then @@ -184,11 +193,19 @@ elif [ -n "$(command -v yum)" ]; then array_deps_missing=() # 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 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 # 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 ) # Project Zomboid and Minecraft elif [ "${engine}" == "projectzomboid" ]||[ "${engine}" == "minecraft" ]; then - array_deps_required+=( java-1.7.0-openjdk ) + array_deps_required+=( java-1.8.0-openjdk ) # Unreal Engine elif [ "${executable}" == "./ucc-bin" ]; then #UT2K4 diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index 260cd91fb..79dc4a4d5 100644 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -28,7 +28,7 @@ echo "" echo "${gamename} Debug" echo "=================================" echo "" -echo -e "Distro: ${os}" +echo -e "Distro: ${distroname}" echo -e "Arch: ${arch}" echo -e "Kernel: ${kernel}" echo -e "Hostname: $HOSTNAME" diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index a38a61488..8c1858c29 100644 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -27,7 +27,7 @@ fn_details_os(){ echo -e "${lightyellow}Distro Details${default}" 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}Kernel:\t${default}${kernel}" echo -e "${blue}Hostname:\t${default}$HOSTNAME" diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 02a2c0488..85801a70d 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -14,15 +14,19 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" arch=$(uname -m) kernel=$(uname -r) 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 - os="Debian $(cat /etc/debian_version)" + distroname="Debian $(cat /etc/debian_version)" elif [ -f "/etc/redhat-release" ]; then - os=$(cat /etc/redhat-release) + distroname=$(cat /etc/redhat-release) else - os="$(uname -s) $(uname -r)" + distroname="$(uname -s) $(uname -r)" fi +distroversion=$(grep VERSION_ID /etc/os-release | tr -cd '[:digit:]') + ## Glibc version # e.g: 1.17 glibcversion="$(ldd --version | sed -n '1s/.* //p')" @@ -31,7 +35,7 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')" # e.g: tmux 1.6 if [ -z "$(command -v tmux)" ]; then 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)" else tmuxv=$(tmux -V) diff --git a/lgsm/functions/info_glibc.sh b/lgsm/functions/info_glibc.sh index 5708da3e6..f0ba4672e 100644 --- a/lgsm/functions/info_glibc.sh +++ b/lgsm/functions/info_glibc.sh @@ -46,7 +46,7 @@ elif [ "${engine}" == "minecraft" ]; then glibcfix="no" elif [ "${engine}" == "projectzomboid" ]; then glibcrequired="2.15" - glibcfix="yesno" + glibcfix="no" elif [ "${engine}" == "realvirtuality" ]; then glibcrequired="2.13" glibcfix="yes"