indent nested function in basic-install.sh
fix dependency in uninstall.sh Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
@@ -177,22 +177,22 @@ if command -v apt-get &> /dev/null; then
|
|||||||
# The DNS server user
|
# The DNS server user
|
||||||
DNSMASQ_USER="dnsmasq"
|
DNSMASQ_USER="dnsmasq"
|
||||||
|
|
||||||
# A function to check...
|
# A function to check...
|
||||||
test_dpkg_lock() {
|
test_dpkg_lock() {
|
||||||
# An iterator used for counting loop iterations
|
# An iterator used for counting loop iterations
|
||||||
i=0
|
i=0
|
||||||
# fuser is a program to show which processes use the named files, sockets, or filesystems
|
# fuser is a program to show which processes use the named files, sockets, or filesystems
|
||||||
# So while the command is true
|
# So while the command is true
|
||||||
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
|
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
|
||||||
# Wait half a second
|
# Wait half a second
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
# and increase the iterator
|
# and increase the iterator
|
||||||
((i=i+1))
|
((i=i+1))
|
||||||
done
|
done
|
||||||
# Always return success, since we only return if there is no
|
# Always return success, since we only return if there is no
|
||||||
# lock (anymore)
|
# lock (anymore)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# If apt-get is not found, check for rpm to see if it's a Red Hat family OS
|
# If apt-get is not found, check for rpm to see if it's a Red Hat family OS
|
||||||
elif command -v rpm &> /dev/null; then
|
elif command -v rpm &> /dev/null; then
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ if [ -x "$(command -v rpm)" ]; then
|
|||||||
PKG_MANAGER="yum"
|
PKG_MANAGER="yum"
|
||||||
fi
|
fi
|
||||||
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
PKG_REMOVE="${PKG_MANAGER} remove -y"
|
||||||
PIHOLE_DEPS=( bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-sqlite git curl unzip wget findutils )
|
PIHOLE_DEPS=( bind-utils bc dnsmasq lighttpd lighttpd-fastcgi php-common php-pdo git curl unzip wget findutils )
|
||||||
package_check() {
|
package_check() {
|
||||||
rpm -qa | grep ^$1- > /dev/null
|
rpm -qa | grep ^$1- > /dev/null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user