mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-25 00:30:29 +00:00
Bash is funny with returns.
This commit is contained in:
parent
12f5f8ba00
commit
d9528dfd09
2 changed files with 10 additions and 6 deletions
|
@ -73,7 +73,7 @@ fi
|
|||
|
||||
# Compatibility
|
||||
|
||||
if [ -x "$(command -v apt-get)" ]; then
|
||||
if [[ $(command -v apt-get) ]]; then
|
||||
#Debian Family
|
||||
#############################################
|
||||
PKG_MANAGER="apt-get"
|
||||
|
@ -99,9 +99,9 @@ if [ -x "$(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 [ -x "$(command -v rpm)" ]; then
|
||||
elif [ $(command -v rpm) ]; then
|
||||
# Fedora Family
|
||||
if [ -x "$(command -v dnf)" ]; then
|
||||
if [ $(command -v dnf) ]; then
|
||||
PKG_MANAGER="dnf"
|
||||
else
|
||||
PKG_MANAGER="yum"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue