|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
@ -94,12 +94,12 @@ removeAndPurge() {
|
|
|
|
|
# Remove dnsmasq config files
|
|
|
|
|
${SUDO} rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig /etc/dnsmasq.d/01-pihole.conf &> /dev/null
|
|
|
|
|
echo -e " ${TICK} Removing dnsmasq config files"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Take care of any additional package cleaning
|
|
|
|
|
echo -ne " ${INFO} Removing & cleaning remaining dependencies..."
|
|
|
|
|
package_cleanup &> /dev/null
|
|
|
|
|
echo -e "${OVER} ${TICK} Removed & cleaned up remaining dependencies"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Call removeNoPurge to remove Pi-hole specific files
|
|
|
|
|
removeNoPurge
|
|
|
|
|
}
|
|
|
|
@ -145,7 +145,7 @@ removeNoPurge() {
|
|
|
|
|
${SUDO} mv /etc/lighttpd/lighttpd.conf.orig /etc/lighttpd/lighttpd.conf
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${SUDO} rm /etc/dnsmasq.d/adList.conf &> /dev/null
|
|
|
|
|
${SUDO} rm /etc/dnsmasq.d/01-pihole.conf &> /dev/null
|
|
|
|
|
${SUDO} rm -rf /var/log/*pihole* &> /dev/null
|
|
|
|
@ -156,23 +156,23 @@ removeNoPurge() {
|
|
|
|
|
${SUDO} rm /etc/bash_completion.d/pihole &> /dev/null
|
|
|
|
|
${SUDO} rm /etc/sudoers.d/pihole &> /dev/null
|
|
|
|
|
echo -e " ${TICK} Removed config files"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove FTL
|
|
|
|
|
if command -v pihole-FTL &> /dev/null; then
|
|
|
|
|
echo -ne " ${INFO} Removing pihole-FTL..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -x "$(command -v systemctl)" ]]; then
|
|
|
|
|
systemctl stop pihole-FTL
|
|
|
|
|
else
|
|
|
|
|
service pihole-FTL stop
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${SUDO} rm /etc/init.d/pihole-FTL
|
|
|
|
|
${SUDO} rm /usr/bin/pihole-FTL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "${OVER} ${TICK} Removed pihole-FTL"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# If the pihole user exists, then remove
|
|
|
|
|
if id "pihole" &> /dev/null; then
|
|
|
|
|
${SUDO} userdel -r pihole 2> /dev/null
|
|
|
|
|