From 8841bdd2523be3774b245064173979c12d436df7 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 21 Dec 2016 12:57:02 +0100 Subject: [PATCH] Reset the if's --- automated install/basic-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index cddc4dbf..fb8570e0 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -62,7 +62,7 @@ else echo ":::" echo "::: Detecting the presence of the sudo utility for continuation of this install..." - if command -v sudo; then + if [ -x "$(command -v sudo)" ]; then echo "::: Utility sudo located." exec curl -sSL https://install.pi-hole.net | sudo bash "$@" exit $? @@ -74,7 +74,7 @@ fi # Compatibility -if command -v apt-get; then +if [[ $(command -v apt-get) ]]; then #Debian Family ############################################# PKG_MANAGER="apt-get" @@ -101,9 +101,9 @@ if command -v apt-get; then package_check_install() { dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed" || ${PKG_INSTALL} "${1}" } -elif command -v rpm; then +elif [ $(command -v rpm) ]; then # Fedora Family - if command -v dnf; then + if [ $(command -v dnf) ]; then PKG_MANAGER="dnf" else PKG_MANAGER="yum"