Make installPiholeWeb() more inteliigent. Checks for existence of /var/www/html/pihole, and only downloads from repo if it does not exist. Will stop install script from overwriting any tweaks users have made to index.html

This commit is contained in:
Promofaux 2016-01-20 22:14:17 +00:00
parent 96011bc2ae
commit 5c25c42da8

View file

@ -252,6 +252,7 @@ $SUDO apt-get -y install git
}
installWebAdmin(){
$SUDO echo " "
if [ -d "/var/www/html/admin" ]; then
$SUDO rm -rf /var/www/html/admin
fi
@ -278,9 +279,14 @@ fi
}
installPiholeWeb(){
$SUDO echo " "
if [ -d "/var/www/html/pihole" ]; then
$SUDO echo "::: Existing pihole custom page detected, not overwriting"
else
$SUDO mkdir /var/www/html/pihole
$SUDO mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.orig
$SUDO curl -o /var/www/html/pihole/index.html https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/index.html
fi
}
installCron(){