1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 04:30:55 +00:00

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:
Adam Warner 2017-08-17 19:43:07 +01:00
parent d92434b1e9
commit 64f29120c8
No known key found for this signature in database
GPG Key ID: 03843F6C65554B22
2 changed files with 25 additions and 25 deletions

View File

@ -177,22 +177,22 @@ if command -v apt-get &> /dev/null; then
# The DNS server user
DNSMASQ_USER="dnsmasq"
# A function to check...
test_dpkg_lock() {
# An iterator used for counting loop iterations
i=0
# fuser is a program to show which processes use the named files, sockets, or filesystems
# So while the command is true
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
# Wait half a second
sleep 0.5
# and increase the iterator
((i=i+1))
done
# Always return success, since we only return if there is no
# lock (anymore)
return 0
}
# A function to check...
test_dpkg_lock() {
# An iterator used for counting loop iterations
i=0
# fuser is a program to show which processes use the named files, sockets, or filesystems
# So while the command is true
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
# Wait half a second
sleep 0.5
# and increase the iterator
((i=i+1))
done
# Always return success, since we only return if there is no
# lock (anymore)
return 0
}
# 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

View File

@ -45,7 +45,7 @@ if [ -x "$(command -v rpm)" ]; then
PKG_MANAGER="yum"
fi
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() {
rpm -qa | grep ^$1- > /dev/null
}