Fix uninstall causing 403 errors and not removing packages

The 403 lighttpd errors were caused by removing the lighttpd config
directory and not removing lighttpd itself. This caused a subsequent
Pi-hole reinstall to not have all of the required lighttpd config files.

The error while removing packages was caused by combining arguments into
a string instead of listing each argument.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
pull/2873/head^2
Mcat12 5 years ago committed by Dan Schaper
parent e27f50b8e5
commit 209555c42e
No known key found for this signature in database
GPG Key ID: B4FF14C01CC08DC0

@ -80,7 +80,7 @@ removeAndPurge() {
case ${yn} in
[Yy]* )
echo -ne " ${INFO} Removing ${i}...";
${SUDO} "${PKG_REMOVE} ${i}" &> /dev/null;
${SUDO} ${PKG_REMOVE} "${i}" &> /dev/null;
echo -e "${OVER} ${INFO} Removed ${i}";
break;;
[Nn]* ) echo -e " ${INFO} Skipped ${i}"; break;;
@ -132,12 +132,15 @@ removeNoPurge() {
fi
if package_check lighttpd > /dev/null; then
${SUDO} rm -rf /etc/lighttpd/ &> /dev/null
echo -e " ${TICK} Removed lighttpd"
else
if [ -f /etc/lighttpd/lighttpd.conf.orig ]; then
if [[ -f /etc/lighttpd/lighttpd.conf.orig ]]; then
${SUDO} mv /etc/lighttpd/lighttpd.conf.orig /etc/lighttpd/lighttpd.conf
fi
if [[ -f /etc/lighttpd/external.conf ]]; then
${SUDO} rm /etc/lighttpd/external.conf
fi
echo -e " ${TICK} Removed lighttpd configs"
fi
${SUDO} rm -f /etc/dnsmasq.d/adList.conf &> /dev/null

Loading…
Cancel
Save