mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 17:13:17 +00:00
Add files via upload
Add capability to specify add a number to the pi-hole host name to indicate the number of pi-hole boxes on the network ie pi1.hole Added capability to specify a different IP address in hosts file to allow for sending to a different server (a honey pot, etc.)
This commit is contained in:
parent
ba6881d685
commit
30fe95c984
1 changed files with 12 additions and 1 deletions
13
gravity.sh
13
gravity.sh
|
@ -27,6 +27,16 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
# If you are running more than one name server then
|
||||
# Uncomment next then change number.
|
||||
#piholeNSnumber=1
|
||||
|
||||
# If you want to send your response to another server then
|
||||
# Uncomment next line to send query to a different ip address than pihole's ip
|
||||
#piholeDumpAddress="0.0.0.0"
|
||||
|
||||
|
||||
piholeIPfile=/etc/pihole/piholeIP
|
||||
piholeIPv6file=/etc/pihole/.useIPv6
|
||||
|
||||
|
@ -261,7 +271,8 @@ function gravity_hostFormat() {
|
|||
else
|
||||
# Otherwise, just create gravity.list as normal using IPv4
|
||||
# Add hostname and dummy domain to the top of gravity.list to make ping result return a friendlier looking domain! Also allows for an easy way to access the Pi-hole admin console (pi.hole/admin)
|
||||
echo -e "$piholeIP $hostname\n$piholeIP pi.hole" > $piholeDir/$accretionDisc
|
||||
echo -e "$piholeIP $hostname\n$piholeIP pi$piholeNSnumber.hole" > $piholeDir/$accretionDisc
|
||||
if ! [[ -n $piholeDumpAddress ]];then piholeDumpAddress="$piholeIP"; fi
|
||||
cat $piholeDir/$eventHorizon | awk -v ipv4addr="$piholeIP" '{sub(/\r$/,""); print ipv4addr" "$0}' >> $piholeDir/$accretionDisc
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue