mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
0.0.0.0 instead of pi-holes IP address for redirect purposes
This commit is contained in:
parent
c31b4383e6
commit
e57425df5f
1 changed files with 27 additions and 12 deletions
|
@ -663,19 +663,23 @@ installConfigs() {
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Installing configs..."
|
echo "::: Installing configs..."
|
||||||
version_check_dnsmasq
|
version_check_dnsmasq
|
||||||
if [ ! -d "/etc/lighttpd" ]; then
|
|
||||||
mkdir /etc/lighttpd
|
#Only mess with lighttpd configs if user has chosen to install web interface
|
||||||
chown "${USER}":root /etc/lighttpd
|
if [[ ${INSTALL_WEB} == true ]]; then
|
||||||
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
if [ ! -d "/etc/lighttpd" ]; then
|
||||||
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
mkdir /etc/lighttpd
|
||||||
|
chown "${USER}":root /etc/lighttpd
|
||||||
|
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
||||||
|
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
||||||
|
fi
|
||||||
|
cp /etc/.pihole/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
||||||
|
mkdir -p /var/run/lighttpd
|
||||||
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
||||||
|
mkdir -p /var/cache/lighttpd/compress
|
||||||
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress
|
||||||
|
mkdir -p /var/cache/lighttpd/uploads
|
||||||
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads
|
||||||
fi
|
fi
|
||||||
cp /etc/.pihole/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
|
||||||
mkdir -p /var/run/lighttpd
|
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
|
||||||
mkdir -p /var/cache/lighttpd/compress
|
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress
|
|
||||||
mkdir -p /var/cache/lighttpd/uploads
|
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_service() {
|
stop_service() {
|
||||||
|
@ -932,6 +936,17 @@ configureFirewall() {
|
||||||
}
|
}
|
||||||
|
|
||||||
finalExports() {
|
finalExports() {
|
||||||
|
|
||||||
|
if [[ ${INSTALL_WEB} == false ]]; then
|
||||||
|
#No web interface installed, and therefore no block page set IPV4/6 to 0.0.0.0 and ::/0
|
||||||
|
if [ ${IPV4_ADDRESS} ]; then
|
||||||
|
IPV4_ADDRESS="0.0.0.0"
|
||||||
|
fi
|
||||||
|
if [ ${IPV6_ADDRESS} ]; then
|
||||||
|
IPV6_ADDRESS="::/0"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Update variables in setupVars.conf file
|
# Update variables in setupVars.conf file
|
||||||
if [ -e "${setupVars}" ]; then
|
if [ -e "${setupVars}" ]; then
|
||||||
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;' "${setupVars}"
|
sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;' "${setupVars}"
|
||||||
|
|
Loading…
Reference in a new issue