mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #896 from pi-hole/bugfix/649
Check for missing index.html, replace if missing.
This commit is contained in:
commit
5986121cfc
1 changed files with 18 additions and 2 deletions
|
@ -822,9 +822,24 @@ CreateLogFile() {
|
||||||
installPiholeWeb() {
|
installPiholeWeb() {
|
||||||
# Install the web interface
|
# Install the web interface
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Installing pihole custom index page..."
|
echo "::: Installing pihole custom index page..."
|
||||||
if [ -d "/var/www/html/pihole" ]; then
|
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.js missing, replacing... "
|
||||||
|
cp /etc/.pihole/advanced/index.js /var/www/html/pihole/
|
||||||
|
echo " done!"
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
mkdir /var/www/html/pihole
|
mkdir /var/www/html/pihole
|
||||||
if [ -f /var/www/html/index.lighttpd.html ]; then
|
if [ -f /var/www/html/index.lighttpd.html ]; then
|
||||||
|
@ -836,6 +851,7 @@ installPiholeWeb() {
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
# Install Sudoer file
|
# Install Sudoer file
|
||||||
|
echo ":::"
|
||||||
echo -n "::: Installing sudoer file..."
|
echo -n "::: Installing sudoer file..."
|
||||||
mkdir -p /etc/sudoers.d/
|
mkdir -p /etc/sudoers.d/
|
||||||
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||||
|
|
Loading…
Reference in a new issue