mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 09:03:17 +00:00
implemented a more graceful removal of /var/www/html - it is dangerous to assume /var/www/html is not being used for anything else when uninstalling pihole
This commit is contained in:
parent
8b51e44074
commit
cb40158910
1 changed files with 10 additions and 1 deletions
|
@ -18,7 +18,16 @@ fi
|
||||||
apt-get -y remove --purge dnsutils bc toilet
|
apt-get -y remove --purge dnsutils bc toilet
|
||||||
apt-get -y remove --purge dnsmasq
|
apt-get -y remove --purge dnsmasq
|
||||||
apt-get -y remove --purge lighttpd php5-common php5-cgi php5
|
apt-get -y remove --purge lighttpd php5-common php5-cgi php5
|
||||||
|
|
||||||
|
# only web directories/files that are created by pihole should
|
||||||
|
# be removed. if the web directory is empty after removing
|
||||||
|
# these files, then the parent html folder can be removed.
|
||||||
|
rm -rf /var/www/html/admin
|
||||||
|
rm -rf /var/www/html/pihold
|
||||||
|
if [ ! "$(ls -A /var/www/html)" ]; then
|
||||||
rm -rf /var/www/html
|
rm -rf /var/www/html
|
||||||
|
fi
|
||||||
|
|
||||||
rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
rm /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
||||||
|
|
||||||
# attempt to preserve backwards compatibility with older versions
|
# attempt to preserve backwards compatibility with older versions
|
||||||
|
|
Loading…
Reference in a new issue