From ed0ddc35f4acb18edb20a5a84276e705a713bc04 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Aug 2016 23:13:08 +0100 Subject: [PATCH] tmux will now be detected if compiled from source #736 --- lgsm/functions/check_deps.sh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index a5f5ef88f..77515afdd 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 @@ -137,7 +142,11 @@ if [ -n "$(command -v dpkg-query)" ]; then # 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 require libstdc++6, lib32gcc1 @@ -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 ) + else + array_deps_required=( curl util-linux python file ) + 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 excelts ts3 & mumble require glibc.i686 libstdc++.i686