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,6 +663,9 @@ installConfigs() {
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Installing configs..."
|
echo "::: Installing configs..."
|
||||||
version_check_dnsmasq
|
version_check_dnsmasq
|
||||||
|
|
||||||
|
#Only mess with lighttpd configs if user has chosen to install web interface
|
||||||
|
if [[ ${INSTALL_WEB} == true ]]; then
|
||||||
if [ ! -d "/etc/lighttpd" ]; then
|
if [ ! -d "/etc/lighttpd" ]; then
|
||||||
mkdir /etc/lighttpd
|
mkdir /etc/lighttpd
|
||||||
chown "${USER}":root /etc/lighttpd
|
chown "${USER}":root /etc/lighttpd
|
||||||
|
@ -676,6 +679,7 @@ installConfigs() {
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress
|
||||||
mkdir -p /var/cache/lighttpd/uploads
|
mkdir -p /var/cache/lighttpd/uploads
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
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