mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-25 16:50:14 +00:00
Cleaned code and added prompt for purge on uninstall
This commit is contained in:
parent
0b5f005a5d
commit
0b9e78df2c
6 changed files with 100 additions and 100 deletions
|
@ -27,9 +27,16 @@ fi
|
|||
|
||||
|
||||
######### SCRIPT ###########
|
||||
$SUDO apt-get -y remove --purge dnsutils bc toilet
|
||||
$SUDO apt-get -y remove --purge dnsmasq
|
||||
$SUDO apt-get -y remove --purge lighttpd php5-common php5-cgi php5
|
||||
read -p "Do you wish to purge PiHole's dependencies from your OS?\n WARNING: This is destructive if run on any non-Debian based OS \n(SAFE TO RUN ON RASPBIAN)" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^{Yy]$ ]]; then
|
||||
$SUDO apt-get -y remove --purge dnsutils bc toilet
|
||||
$SUDO apt-get -y remove --purge dnsmasq
|
||||
$SUDO apt-get -y remove --purge lighttpd php5-common php5-cgi php5
|
||||
|
||||
echo "Removing dnsmasq config files..."
|
||||
$SUDO rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
||||
fi
|
||||
|
||||
# Only web directories/files that are created by pihole should be removed.
|
||||
echo "Removing the Pi-hole Web server files..."
|
||||
|
@ -42,9 +49,6 @@ if [[ ! "$(ls -A /var/www/html)" ]]; then
|
|||
$SUDO rm -rf /var/www/html
|
||||
fi
|
||||
|
||||
echo "Removing dnsmasq config files..."
|
||||
$SUDO rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
||||
|
||||
# Attempt to preserve backwards compatibility with older versions
|
||||
# to guarantee no additional changes were made to /etc/crontab after
|
||||
# the installation of pihole, /etc/crontab.pihole should be permanently
|
||||
|
@ -63,7 +67,6 @@ if [[ -f /etc/cron.d/pihole ]];then
|
|||
fi
|
||||
|
||||
echo "Removing config files and scripts..."
|
||||
$SUDO rm /etc/dnsmasq.conf
|
||||
$SUDO rm -rf /etc/lighttpd/
|
||||
$SUDO rm /var/log/pihole.log
|
||||
$SUDO rm /usr/local/bin/gravity.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue