mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
remove code that replaces tokens in 01-pihole.conf
This commit is contained in:
parent
684ac98c8e
commit
c10ec5548f
1 changed files with 0 additions and 30 deletions
|
@ -612,36 +612,6 @@ version_check_dnsmasq() {
|
|||
sed -i '/^server=@DNS2@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
#sed -i "s/@HOSTNAME@/$hostname/" ${dnsmasq_pihole_01_location}
|
||||
|
||||
if [[ -f /etc/hostname ]]; then
|
||||
hostname=$(</etc/hostname)
|
||||
elif [ -x "$(command -v hostname)" ]; then
|
||||
hostname=$(hostname -f)
|
||||
fi
|
||||
|
||||
#Replace IPv4 and IPv6 tokens in 01-pihole.conf for pi.hole resolution.
|
||||
if [[ "${IPV4_ADDRESS}" != "" ]]; then
|
||||
tmp=${IPV4_ADDRESS%/*}
|
||||
sed -i "s/@IPv4@/$tmp/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/pi.hole\/@IPv4@/d' ${dnsmasq_pihole_01_location}
|
||||
sed -i '/^address=\/@HOSTNAME@\/@IPv4@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
if [[ "${IPV6_ADDRESS}" != "" ]]; then
|
||||
sed -i "s/@IPv6@/$IPV6_ADDRESS/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/pi.hole\/@IPv6@/d' ${dnsmasq_pihole_01_location}
|
||||
sed -i '/^address=\/@HOSTNAME@\/@IPv6@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
if [[ "${hostname}" != "" ]]; then
|
||||
sed -i "s/@HOSTNAME@/$hostname/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/@HOSTNAME@*/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' ${dnsmasq_conf}
|
||||
|
||||
if [[ "${QUERY_LOGGING}" == false ]] ; then
|
||||
|
|
Loading…
Reference in a new issue