From d273b4b48b0d6f44e3be63c6be8a8b88ba1e7ba8 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Wed, 2 Nov 2016 20:57:56 +0000 Subject: [PATCH 1/3] Check for missing index.html, replace if missing. --- automated install/basic-install.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2e8ae77d..aef1b443 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -822,9 +822,24 @@ CreateLogFile() { installPiholeWeb() { # Install the web interface echo ":::" - echo -n "::: Installing pihole custom index page..." + echo "::: Installing pihole custom index page..." if [ -d "/var/www/html/pihole" ]; then - echo " Existing page detected, not overwriting" + if [ -f "/var/www/html/pihole/index.html" ]; then + echo "::: Existing index.html detected, not overwriting" + else + echo -n "::: index.html missing, replacing... " + cp /etc/.pihole/advanced/index.html /var/www/html/pihole/ + echo " done!" + fi + + if [ -f "/var/www/html/pihole/index.js" ]; then + echo "::: Existing index.js detected, not overwriting" + else + echo -n "::: index.html missing, replacing... " + cp /etc/.pihole/advanced/index.js /var/www/html/pihole/ + echo " done!" + fi + else mkdir /var/www/html/pihole if [ -f /var/www/html/index.lighttpd.html ]; then From a182a208dca31ec1d28280ecd2a8835ef0fc1181 Mon Sep 17 00:00:00 2001 From: Promofaux Date: Wed, 2 Nov 2016 21:06:12 +0000 Subject: [PATCH 2/3] Tidy up output --- automated install/basic-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index aef1b443..aa6e6dda 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -851,6 +851,7 @@ installPiholeWeb() { echo " done!" fi # Install Sudoer file + echo ":::" echo -n "::: Installing sudoer file..." mkdir -p /etc/sudoers.d/ cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole From c452a4569e2fc55f6bc3067a458aa538df3cc28d Mon Sep 17 00:00:00 2001 From: Promofaux Date: Wed, 2 Nov 2016 21:17:00 +0000 Subject: [PATCH 3/3] .js --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index aa6e6dda..14d271ef 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -835,7 +835,7 @@ installPiholeWeb() { if [ -f "/var/www/html/pihole/index.js" ]; then echo "::: Existing index.js detected, not overwriting" else - echo -n "::: index.html missing, replacing... " + echo -n "::: index.js missing, replacing... " cp /etc/.pihole/advanced/index.js /var/www/html/pihole/ echo " done!" fi