mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-01-26 22:39:48 +00:00
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:
parent
96011bc2ae
commit
5c25c42da8
1 changed files with 18 additions and 12 deletions
|
@ -252,6 +252,7 @@ $SUDO apt-get -y install git
|
||||||
}
|
}
|
||||||
|
|
||||||
installWebAdmin(){
|
installWebAdmin(){
|
||||||
|
$SUDO echo " "
|
||||||
if [ -d "/var/www/html/admin" ]; then
|
if [ -d "/var/www/html/admin" ]; then
|
||||||
$SUDO rm -rf /var/www/html/admin
|
$SUDO rm -rf /var/www/html/admin
|
||||||
fi
|
fi
|
||||||
|
@ -278,9 +279,14 @@ fi
|
||||||
}
|
}
|
||||||
|
|
||||||
installPiholeWeb(){
|
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 mkdir /var/www/html/pihole
|
||||||
$SUDO mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.orig
|
$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
|
$SUDO curl -o /var/www/html/pihole/index.html https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/index.html
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
installCron(){
|
installCron(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue