Rename index.html to index.php
This commit is contained in:
parent
f98de3d5db
commit
b246dba7e7
|
@ -21,7 +21,7 @@ server.modules = (
|
||||||
)
|
)
|
||||||
|
|
||||||
server.document-root = "/var/www/html"
|
server.document-root = "/var/www/html"
|
||||||
server.error-handler-404 = "pihole/index.html"
|
server.error-handler-404 = "pihole/index.php"
|
||||||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
||||||
server.errorlog = "/var/log/lighttpd/error.log"
|
server.errorlog = "/var/log/lighttpd/error.log"
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
server.pid-file = "/var/run/lighttpd.pid"
|
||||||
|
|
|
@ -22,7 +22,7 @@ server.modules = (
|
||||||
)
|
)
|
||||||
|
|
||||||
server.document-root = "/var/www/html"
|
server.document-root = "/var/www/html"
|
||||||
server.error-handler-404 = "pihole/index.html"
|
server.error-handler-404 = "pihole/index.php"
|
||||||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
||||||
server.errorlog = "/var/log/lighttpd/error.log"
|
server.errorlog = "/var/log/lighttpd/error.log"
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
server.pid-file = "/var/run/lighttpd.pid"
|
||||||
|
|
|
@ -21,6 +21,7 @@ set -e
|
||||||
tmpLog=/tmp/pihole-install.log
|
tmpLog=/tmp/pihole-install.log
|
||||||
instalLogLoc=/etc/pihole/install.log
|
instalLogLoc=/etc/pihole/install.log
|
||||||
setupVars=/etc/pihole/setupVars.conf
|
setupVars=/etc/pihole/setupVars.conf
|
||||||
|
lighttpdConfig=/etc/lighttpd/lighttpd.conf
|
||||||
|
|
||||||
webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
|
webInterfaceGitUrl="https://github.com/pi-hole/AdminLTE.git"
|
||||||
webInterfaceDir="/var/www/html/admin"
|
webInterfaceDir="/var/www/html/admin"
|
||||||
|
@ -709,9 +710,9 @@ installConfigs() {
|
||||||
mkdir /etc/lighttpd
|
mkdir /etc/lighttpd
|
||||||
chown "${USER}":root /etc/lighttpd
|
chown "${USER}":root /etc/lighttpd
|
||||||
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
||||||
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
mv ${lighttpdConfig} ${lighttpdConfig}.orig
|
||||||
fi
|
fi
|
||||||
cp /etc/.pihole/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
cp /etc/.pihole/advanced/${LIGHTTPD_CFG} ${lighttpdConfig}
|
||||||
mkdir -p /var/run/lighttpd
|
mkdir -p /var/run/lighttpd
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
||||||
mkdir -p /var/cache/lighttpd/compress
|
mkdir -p /var/cache/lighttpd/compress
|
||||||
|
@ -825,11 +826,11 @@ installPiholeWeb() {
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: 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
|
||||||
if [ -f "/var/www/html/pihole/index.html" ]; then
|
if [ -f "/var/www/html/pihole/index.php" ]; then
|
||||||
echo "::: Existing index.html detected, not overwriting"
|
echo "::: Existing index.php detected, not overwriting"
|
||||||
else
|
else
|
||||||
echo -n "::: index.html missing, replacing... "
|
echo -n "::: index.php missing, replacing... "
|
||||||
cp /etc/.pihole/advanced/index.html /var/www/html/pihole/
|
cp /etc/.pihole/advanced/index.php /var/www/html/pihole/
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -955,6 +956,9 @@ accountForRefactor() {
|
||||||
sed -i 's/piholeDNS1/PIHOLE_DNS_1/g' ${setupVars}
|
sed -i 's/piholeDNS1/PIHOLE_DNS_1/g' ${setupVars}
|
||||||
sed -i 's/piholeDNS2/PIHOLE_DNS_2/g' ${setupVars}
|
sed -i 's/piholeDNS2/PIHOLE_DNS_2/g' ${setupVars}
|
||||||
|
|
||||||
|
# Account for change in lighttpd config file
|
||||||
|
sed -i 's:pihole/index.html:pihole/index.php:' ${lighttpdConfig}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePihole() {
|
updatePihole() {
|
||||||
|
|
Loading…
Reference in New Issue