mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Remove pi.hole references in gravity.sh
This commit is contained in:
parent
911053f63f
commit
7653b3d088
1 changed files with 3 additions and 3 deletions
|
@ -244,19 +244,19 @@ gravity_hostFormat() {
|
|||
if [[ -n "${IPv4_address}" && -n "${IPv6_address}" ]];then
|
||||
|
||||
# Both IPv4 and IPv6
|
||||
echo -e "$IPv4_address $hostname\n$IPv6_address $hostname\n$IPv4_address pi.hole\n$IPv6_address pi.hole" > ${piholeDir}/${accretionDisc}
|
||||
echo -e "$IPv4_address $hostname\n$IPv6_address $hostname" > ${piholeDir}/${accretionDisc}
|
||||
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$IPv4_address" -v ipv6addr="$IPv6_address" '{sub(/\r$/,""); print ipv4addr" "$0"\n"ipv6addr" "$0}' >> ${piholeDir}/${accretionDisc}
|
||||
|
||||
elif [[ -n "${IPv4_address}" && -z "${IPv6_address}" ]];then
|
||||
|
||||
# Only IPv4
|
||||
echo -e "$IPv4_address $hostname\n$IPv4_address pi.hole" > ${piholeDir}/${accretionDisc}
|
||||
echo -e "$IPv4_address $hostname" > ${piholeDir}/${accretionDisc}
|
||||
cat ${piholeDir}/${eventHorizon} | awk -v ipv4addr="$IPv4_address" '{sub(/\r$/,""); print ipv4addr" "$0}' >> ${piholeDir}/${accretionDisc}
|
||||
|
||||
elif [[ -z "${IPv4_address}" && -n "${IPv6_address}" ]];then
|
||||
|
||||
# Only IPv6
|
||||
echo -e "$IPv6_address $hostname\n$IPv6_address pi.hole" > ${piholeDir}/${accretionDisc}
|
||||
echo -e "$IPv6_address $hostname" > ${piholeDir}/${accretionDisc}
|
||||
cat ${piholeDir}/${eventHorizon} | awk -v ipv6addr="$IPv6_address" '{sub(/\r$/,""); print ipv6addr" "$0}' >> ${piholeDir}/${accretionDisc}
|
||||
|
||||
elif [[ -z "${IPv4_address}" && -z "${IPv6_address}" ]];then
|
||||
|
|
Loading…
Reference in a new issue