mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Reset the if's
This commit is contained in:
parent
58261098fb
commit
8841bdd252
1 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ else
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Detecting the presence of the sudo utility for continuation of this install..."
|
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."
|
echo "::: Utility sudo located."
|
||||||
exec curl -sSL https://install.pi-hole.net | sudo bash "$@"
|
exec curl -sSL https://install.pi-hole.net | sudo bash "$@"
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -74,7 +74,7 @@ fi
|
||||||
|
|
||||||
# Compatibility
|
# Compatibility
|
||||||
|
|
||||||
if command -v apt-get; then
|
if [[ $(command -v apt-get) ]]; then
|
||||||
#Debian Family
|
#Debian Family
|
||||||
#############################################
|
#############################################
|
||||||
PKG_MANAGER="apt-get"
|
PKG_MANAGER="apt-get"
|
||||||
|
@ -101,9 +101,9 @@ if command -v apt-get; then
|
||||||
package_check_install() {
|
package_check_install() {
|
||||||
dpkg-query -W -f='${Status}' "${1}" 2>/dev/null | grep -c "ok installed" || ${PKG_INSTALL} "${1}"
|
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
|
# Fedora Family
|
||||||
if command -v dnf; then
|
if [ $(command -v dnf) ]; then
|
||||||
PKG_MANAGER="dnf"
|
PKG_MANAGER="dnf"
|
||||||
else
|
else
|
||||||
PKG_MANAGER="yum"
|
PKG_MANAGER="yum"
|
||||||
|
|
Loading…
Reference in a new issue