Merge pull request #961 from pi-hole/customblockpage

Custom Pi-Hole block page
This commit is contained in:
Dan Schaper
2016-12-27 10:25:03 -08:00
committed by GitHub
6 changed files with 251 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ set -e
tmpLog=/tmp/pihole-install.log
instalLogLoc=/etc/pihole/install.log
setupVars=/etc/pihole/setupVars.conf
lighttpdConfig=/etc/lighttpd/lighttpd.conf
webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
webInterfaceDir="/var/www/html/admin"
@@ -784,11 +785,11 @@ installPiholeWeb() {
echo ":::"
echo "::: Installing pihole custom index page..."
if [ -d "/var/www/html/pihole" ]; then
if [ -f "/var/www/html/pihole/index.html" ]; then
echo "::: Existing index.html detected, not overwriting"
if [ -f "/var/www/html/pihole/index.php" ]; then
echo "::: Existing index.php detected, not overwriting"
else
echo -n "::: index.html missing, replacing... "
cp /etc/.pihole/advanced/index.html /var/www/html/pihole/
echo -n "::: index.php missing, replacing... "
cp /etc/.pihole/advanced/index.php /var/www/html/pihole/
echo " done!"
fi
@@ -800,6 +801,14 @@ installPiholeWeb() {
echo " done!"
fi
if [ -f "/var/www/html/admin/blockingpage.css" ]; then
echo "::: Existing blockingpage.css detected, not overwriting"
else
echo -n "::: index.css missing, replacing... "
cp /etc/.pihole/advanced/blockingpage.css /var/www/html/admin
echo " done!"
fi
else
mkdir /var/www/html/pihole
if [ -f /var/www/html/index.lighttpd.html ]; then